Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 05 Jun 2008 14:16:43 +0430
From:      "H.fazaeli" <fazaeli@sepehrs.com>
To:        David Martens <dmartens@fresnochristian.com>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: fwd problem
Message-ID:  <4847B603.6080105@sepehrs.com>
In-Reply-To: <2D6927C5-B7C7-454B-83E0-FAD76878356C@fresnochristian.com>
References:  <2D6927C5-B7C7-454B-83E0-FAD76878356C@fresnochristian.com>

next in thread | previous in thread | raw e-mail | index | archive | help

This is what is happening:

1. Client's packet match with fwd rule on gateway.
2. gateway tries to fwd packet to 192.168.3.2. For this, it should replace
   destination mac address with that of proxy (192.168.3.22).
3. gateway fails to obtain proxy mac address, since it is not on the same
   subnet as proxy (can not use arp).
4. fwd rule drops the packet.

FIX: assign a 192.168.3.XXX address to the gateway's interface
which proxy is supposed to be reachable from.



David Martens wrote:
> I'm trying to set up a transparent proxy using two machines,  the 
> gateway and the proxy.  The proxy is 192.168.3.22 and is listening on 
> port 8082.  The gateway is 192.168.0.1, subnet is 255.255.252.0 so 
> everything is on the same subnet.
>
> I set the following rules on the gateway:
>
> 00100 allow ip from any to any via lo0
> 00110 deny ip from any to 127.0.0.0/8 via en0
> 00800 divert 8668 ip from any to any via en0
> 00850 deny ip from any to any in frag
> 00990 fwd 192.168.3.22 tcp from 192.168.1.0/24 to any 80
>
> When I get a packet count (ipfw -a list) rule 990 increments when I 
> try to access a web page.
>
> On the proxy box I have the following rules:
>
> 00100 allow tcp from 192.168.3.22 to any
> 00110 fwd 127.0.0.1,8082 tcp from 192.168.0.1/22 to any dst-port 80
>
> rule 110 never receives any forwarded packets. Any ideas what I've 
> done wrong here? The http requests do go out, but are not forwarded 
> through the proxy.
> _______________________________________________
> freebsd-ipfw@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw
> To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org"
>
>

-- 


Best regards.

Hooman Fazaeli <hf@sepehrs.com>
Sepehr S. T. Co. Ltd.

Web: http://www.sepehrs.com
Tel: (9821)88975701-2
Fax: (9821)88983352







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4847B603.6080105>