I am setting a FreeBSD router (7.1 Release) and have run into a problem with the address it is using for outgoing traffic orginated from the FreeBSD system. Traffic from nodes on the attached links is fine.
The config looks like:
The 10.0.0.0/8 subnet is NATed using PF. The 66.x.x.x/29 is public space. The DLS router has static routes that point the 66.xxx.xxx.1/29 to 192.168.0.2. The FreeBSD system has a default route set to 192.168.0.1.
Traffic from nodes on the VR2 and VR3 links works fine. NAT works fine on VR3. The problem is that traffic that originates from the FreeBSD system itself (i.e., ping from the console, NTP, etc.) uses the 192.168.0.2 address on VR1. This doesn't work because it is private address space. I assume it is picking this address because of the default address statement in rc.conf.
How can I tell FreeBSD to use a different address to originate traffic, such as 66.xxx.xxx.1? Pings of the form
work fine.
Thanks an advance.
The config looks like:
Code:
| DSL
| 66.xxx.xxx.0
-------
| DSL |
| rtr |
-------
| 192.168.0.1/16
|
| VR1 192.168.0.2/16
---------
|FreeBSD| VR2 66.xxx.xxx.1/29
| rtr |--------
| 7.1 |
---------
| VR3 10.0.0.1/8
|
Traffic from nodes on the VR2 and VR3 links works fine. NAT works fine on VR3. The problem is that traffic that originates from the FreeBSD system itself (i.e., ping from the console, NTP, etc.) uses the 192.168.0.2 address on VR1. This doesn't work because it is private address space. I assume it is picking this address because of the default address statement in rc.conf.
How can I tell FreeBSD to use a different address to originate traffic, such as 66.xxx.xxx.1? Pings of the form
% ping -S 66.xxx.xxx.1 209.85.171.100
work fine.
Thanks an advance.