From owner-freebsd-questions Sun Jun 10 19:43:55 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.hust.edu.cn (mail.hust.edu.cn [202.112.20.140]) by hub.freebsd.org (Postfix) with ESMTP id 9771037B401 for ; Sun, 10 Jun 2001 19:43:47 -0700 (PDT) (envelope-from wtxiatao@hust.edu.cn) Received: from rhapsody ([202.114.1.2]) by mail.hust.edu.cn (Sun Internet Mail Server sims.3.5.1999.07.30.00.05.p8) with SMTP id <0GEQ00ELAVJZL0@mail.hust.edu.cn> for freebsd-questions@freebsd.org; Mon, 11 Jun 2001 10:43:11 +0800 (CST) Date: Mon, 11 Jun 2001 10:44:48 +0800 From: Xia Tao Subject: Re: How to change the default source address? To: Christopher Farley Cc: freebsd-questions@freebsd.org Reply-To: Xia Tao Message-id: <01c301c0f220$7b7f9d10$6401010a@rhapsody> Organization: Dept. of Computer, Huazhong Univ. of Sci.&Tech. MIME-version: 1.0 X-Mailer: Microsoft Outlook Express 5.50.4131.1600 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7bit X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4131.1600 References: <200106100607.BAA16222@drake.host4u.net> <016f01c0f1ab$3f6020e0$6401010a@rhapsody> <20010610111042.A51916@northernbrewer.com> <20010610111430.B51916@northernbrewer.com> X-Priority: 3 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, Thanks for your reply. But it seems that it does not work this way.I think that Because the gateway is 192.168.251.80 always.So the FreeBSD takes the 192.168.251.30 as the default source address. Anyway, I found a way to solve this problem.I install ipfw+natd. And ipfirewall open natd -a 210.74.130.100 Then it works well. > Christopher Farley (chris@northernbrewer.com) wrote: > > > ifconfig_ed0_alias0="inet 210.74.130.100 netmask 255.255.255.255" > > ifconfig_ed0_alias1="inet 10.0.0.2 netmask 255.255.255.255" > > You'll want to replace 10.0.0.2 with your own private IP, in your case > 192.168.251.30... > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message