Hi,
ok, more precise:
I can ping from the firewall and the workstation seperately and to different ips.
example:
workstation: ping 193.174.80.12, works.
firewall: ping 62.156.209.1, works.
Ping runs at the same time.
When I do a ping to the same ip address from the workstation and the firewall the ping 
from the firewall fails.
Resulting in blocked packets (look at ipmon output below).
By the way, the rules are applied.

> 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.
*************************************************************************

A little bit confuse here. "I do a ping from workstation to IP on the
internet. Works fine. But later u said u failed to ping, is it after apply
the rules? (think so, but I would like to confirm :) )

*************************************************************************

> 
> 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

**************************************************************************

Rules are only write for tun0. In my experience, if we write rules for
workstation, (and no ip traffic from the firewall, only write the rules for
rl0 (internal interface is enough ( of course security is another matter)
Like example here.
pass in quick on rl0 from internal_ip to any keep state


And the workstation can get access to the internet.
As describe in the ipfilter FAQ
http://www.phildev.net/ipf/IPFques.html#1
"keep state" will handle the traffic in the reverse direction. So no rules
for tun0 is require.

In your case, the rules for tun0 will work for the firewall itself but not
for the workstation. Please try to add some rules for rl0 and test to see
does it work correctly.

**************************************************************************
> 
> 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
> 

Hopes information help. I am new to this list too, please told me if I am
wrong~ =) 
Cheers
Fai




Reply via email to