IP aliases and forcing outbound IP

Mark A. Garcia mag at hamletinc.com
Wed Mar 9 10:10:06 PST 2005


patrick wrote:

>I have a FreeBSD 4.11 box whose ethernet card has several IP address. 
>
>        inet 10.0.1.254 netmask 0xffffff00 broadcast 10.0.1.255
>        inet 10.0.1.111 netmask 0xffffffff broadcast 10.0.1.111
>
>Is there a way I can cause outbound connections to certain hosts to be
>from 10.0.1.111 instead of the default 10.0.1.254? I used to be able
>to do this fairly easy in Linux because each alias is actually a
>separate ethernet device (eg. eth0:0, eth0:1, etc.), but I haven't
>figured out how to do this in FreeBSD.
>
You can try ipnat and set rules to rewrite your source address when 
attempting to contact specific hosts remotely.

-.mag


More information about the freebsd-questions mailing list