Hi list!
I got some very strange issue regarding nat.
The network:

workstation -> firewall(FreeBSD 5.2.1) -> Internet(DSL)
192.168.64.200 -> 192.168.64.254, dyn ip
Interfaces:
firewall: rl0, internal 192.168.1.2
          rl1, external connect to DSL.
          tun0, internet

So now the problem:
I do a ping from firewall to IP on the internet. Works fine.
I do a ping from workstation to IP on the internet. Works fine.

I do a ping from firewall to IP on the internet, works fine, I do a ping to the SAME 
IP from the workstation, the ping from the firewall is blocked by ipfilter.

The ipmon output shows the blocking of the packets coming from the firewall! Despite 
the workstation ip is shown. But it is
definite the blocking of icmp packets coming from the firewall while the workstation 
pings the same address!

Here some log/tcpdump entries:
ipmon -o I:
22/03/2004 21:33:27.992611 tun0 @0:7 b 62.156.209.1 -> 192.168.64.200 PR icmp len 20 
84 icmp echoreply/0 IN NAT
22/03/2004 21:33:29.003110 tun0 @0:7 b 62.156.209.1 -> 192.168.64.200 PR icmp len 20 
84 icmp echoreply/0 IN NAT
22/03/2004 21:33:30.013111 tun0 @0:7 b 62.156.209.1 -> 192.168.64.200 PR icmp len 20 
84 icmp echoreply/0 IN NAT
22/03/2004 21:33:31.023105 tun0 @0:7 b 62.156.209.1 -> 192.168.64.200 PR icmp len 20 
84 icmp echoreply/0 IN NAT
22/03/2004 21:33:32.031604 tun0 @0:7 b 62.156.209.1 -> 192.168.64.200 PR icmp len 20 
84 icmp echoreply/0 IN NAT

tcpdump - tun0 icmp:
21:34:05.838427 62.156.209.1 > 80.133.254.18: icmp: echo reply
21:34:06.370601 80.133.254.18 > 62.156.209.1: icmp: echo request
21:34:06.432917 62.156.209.1 > 80.133.254.18: icmp: echo reply
21:34:06.775350 80.133.254.18 > 62.156.209.1: icmp: echo request
21:34:06.835048 62.156.209.1 > 80.133.254.18: icmp: echo reply

The rules sets:
ipf:
pass out quick on tun0 proto icmp from any to any icmp-type 8 code 0 keep state
pass out quick on tun0 proto icmp from any to any icmp-type 11 code 0 keep state
pass out quick on tun0 proto icmp from any to any icmp-type 3 code 3 keep state
pass out log quick on tun0 proto tcp from any to any keep state
pass out log quick on tun0 proto udp from any to any keep state
pass in log quick on tun0 proto tcp from any to any port = 4662
pass out log quick on tun0 proto gre from any to any
pass in log quick on tun0 proto gre from any to any
pass out quick on tun0 proto esp from any to any
pass in quick on tun0 proto esp from any to any
pass out quick on tun0 proto ipencap from any to any
pass in quick on tun0 proto ipencap from any to any
pass out quick on tun0 proto ah from any to any 
pass in quick on tun0 proto ah from any to any 
pass out quick on tun0 proto udp from any to any port = isakmp
pass in quick on tun0 proto udp from any to any port = isakmp
block in log quick on tun0 all

ipnat:
map tun0 192.168.64.0/24 -> 0/32 proxy port ftp ftp/tcp
map tun0 192.168.64.0/24 -> 0/32 portmap tcp/udp 10000:60000
map tun0 192.168.64.0/24 -> 0/32
rdr tun0 0.0.0.0/0 port 4662 -> 192.168.64.200 port 4662

regards
Marcus


Reply via email to