From owner-freebsd-questions@FreeBSD.ORG Thu Oct 30 10:51:13 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 47A2A106568A for ; Thu, 30 Oct 2008 10:51:13 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id E344A8FC18 for ; Thu, 30 Oct 2008 10:51:12 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA05.westchester.pa.mail.comcast.net ([76.96.62.43]) by QMTA10.westchester.pa.mail.comcast.net with comcast id Yxgy1a00C0vyq2s5AyrB2i; Thu, 30 Oct 2008 10:51:11 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA05.westchester.pa.mail.comcast.net with comcast id YyrB1a00F2P6wsM3RyrBlQ; Thu, 30 Oct 2008 10:51:12 +0000 X-Authority-Analysis: v=1.0 c=1 a=OtLvMaB0incA:10 a=AYlMsm8xYfcA:10 a=QycZ5dHgAAAA:8 a=ENZM2WAM-gBNsWK89K0A:9 a=6dis1JjRv1UywDa7Lxc825tlCL0A:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id D83E2C9419; Thu, 30 Oct 2008 03:51:10 -0700 (PDT) Date: Thu, 30 Oct 2008 03:51:10 -0700 From: Jeremy Chadwick To: Chris Hastie Message-ID: <20081030105110.GA2932@icarus.home.lan> References: <49097C34.3030608@oak-wood.co.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49097C34.3030608@oak-wood.co.uk> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-questions@freebsd.org Subject: Re: Setting a different default source address X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Oct 2008 10:51:13 -0000 On Thu, Oct 30, 2008 at 09:19:48AM +0000, Chris Hastie wrote: > Is it possible to set a default source address on a machine? > > I have an ADSL connection with a fixed IP and a further /29 routed to > it. Until recently I used an ADSL router which acquired the connection > IP, and then the first of the /29 on the internal interface. > > In an effort to conserve both IPs and the number of machines I have > running I have recently changed to using an ADSL modem (Vigor Draytek > 110) which essentially does no more than change the PPPoA to PPPoE. A > FreeBSD machine then handles the connection using ppp. > > The machine in question has always used one of the /29 addresses, and > continues to do so (this is assigned to its DMZ facing NIC, vr0). Now, > of course, outgoing packets are using the connection address, which is > assigned to tun0. > > Whilst I can override this on an application by application basis for > many things (eg postfix smtp_bind_address parameter, ping -S switch) is > there any way to override it system wide, so that the address from the > /29 is used by default? > > I think I succeeded in doing something similar for an IPv6 tunnel by not > assigning an IP address to gif0 and configuring the routing as follows > in rc.conf: > > ipv6_defaultrouter="-interface gif0" > > But I'm not clear whether this would work with ppp, and if so, how to do it. Try freebsd-net? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |