FreeBSD routing
Bob Hepple
bhepple at freeshell.org
Mon Oct 17 10:48:01 PDT 2005
On Mon, 17 Oct 2005 14:44:07 +1000
Richard Burakowski <richard.burakowski at mrburak.net> wrote:
> Bob
>
> I'm having a hard time imagining how the packets are finding their way
> back during your linux testing. How does 2.214 know what to do with the
> reply when it recieves the echo request from 254.245?
Well, it has to be taught ... eg with a FreeBSD 2.214 I can do this:
route delete default
route add -net 192.168.254.0 -interface xl0 # !!!
route add default 192.168.254.245
cp /etc/resolv.conf.home /etc/resolv.conf
and I get this:
Destination Gateway Flags Refs Use Netif Expire
default 192.168.254.245 UGS 0 1 xl0
127.0.0.1 127.0.0.1 UH 0 4 lo0
192.168.2 link#1 UC 0 0 xl0
192.168.2.15 link#1 UHLW 1 0 xl0
192.168.4 192.168.2.15 UGS 0 0 xl0
192.168.254 link#1 UCS 0 0 xl0
192.168.254.245 00:01:29:74:99:c2 UHLW 1 96 xl0 1060
In other words FreeBSD is happy to create a _subnet_ 192.168.254.0/24,
even though it won't create a route to a specific host.
> Was openvpn up
> during you linux testing and down during your freebsd testing?
Yes - absolutely although I don't usually bother to provide NAT for the
2.214 access to 2.0
> Can we
> see your linux routing tables during the various stages?
Yup - here ya go:
bhepple at raita:~/ $ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.1.2.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.2.214 0.0.0.0 255.255.255.255 UH 0 0 0 eth0
192.168.4.0 10.1.2.1 255.255.255.0 UG 0 0 0 tun0
192.168.2.0 10.1.2.1 255.255.255.0 UG 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 ath0
192.168.254.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 0 0 lo
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 ath0
tun0 is the openvpn device
ath0 is the wireless connection to the internet
eth0 is the 10baseT network
>
> Is it possible to preconfigure the servers to your home subnet instead
> of 192.168.2.214? or additionally? it shouldn't cause any dramas if
> your home subnet dosen't appear at work.
Hmmm - not quite sure what you're driving at here. I need to have a sleep
and a think!!
Cheers
Bob
--
Bob Hepple
mailto:bhepple at freeshell.org http://bhepple.freeshell.org
Public Key: http://bhepple.freeshell.org/public_keys.txt
More information about the freebsd-questions
mailing list