Daemon News Ezine BSD News BSD Mall BSD Support Forum BSD Advocacy BSD Updates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NATd issue


I've the network below :
| FreeBSD
x.x.x.x router 1
y.y.y.y FreeBSD router 2

Each gateway run racoon.
Each network can go on Internet.
VPN is ok.

I would like to NAT packets from to with IP on router 1. VPN interface is gif5 on router 1.

My ipfw rules :
dialup:~# ipfw show | grep 8670
00650 4 400 divert 8670 ip from to
00660 4 400 divert 8670 ip from

natd in debug mode :

dialup:~# natd -v -p natd-vpn -interface gif5
natd[42308]: Aliasing to, mtu 1280 bytes
In [ICMP] [ICMP] -> 8(0) aliased to
[ICMP] -> 8(0)
Out [ICMP] [ICMP] -> 0(0) aliased to
[ICMP] -> 0(0)

As you can see, packets are not translated with IP

Same result with natd -p natd-vpn -a

I think the solution will be with -reverse, when I use it, packets are natd (ping from to :

dialup:/etc# natd -v -p natd-vpn -reverse -interface gif5
natd[43271]: Aliasing to, mtu 1280 bytes
In [ICMP] [ICMP] -> 8(0) aliased to
[ICMP] -> 8(0)

tcmpdump on remote gateway :
11:26:44.641090 IP > icmp 64: echo request seq 0
11:26:44.641240 IP > icmp 64: echo reply seq 0

But I haven't got any reply on localsite (, I haven't got packet OUT on natd.


Thanks !

Have a nice Christmas !