Creating IP-IP tunnel between FreeBSD and Linux

, , Leave a comment


Suppose we have 2 cars PC1 (FreeBSD, ip-address IP1, interface INT1) and PC2 (Linux, IP2, INT2).
Lets build IP-IP tunnel (on the side of FreeBSD will address TUN1, Linux ā€“ tun2):

bsd# nos-tun -t /dev/tun0 -s  TUN1 -d  Apache  TUN2 -p 4  IP2
bsd# ifconfig tun0 mtu 1500
bsd# ifconfig tun0 up
linux# ip tunnel add tun0 mode ipip  remote IP1 local IP2 dev INT2
linux# ifconfig tun0 TUN2 pointopoint TUN1
linux# ifconfig tun0 mtu 1500
linux# ifconfig tun0 up
 

Leave a Reply