Setting a different default source address

2008-10-30 Thread Chris Hastie
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.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Setting a different default source address

2008-10-30 Thread Jeremy Chadwick
On Thu, Oct 30, 2008 at 09:19:48AM +, 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 Chadwickjdc 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 |

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]