>>> On Tue, Oct 19, 2004 at 10:28:41PM +1000, Darren Reed wrote:
>>>> >
>>>> > You could try:
>>>> > map tun0 from any to 192.168.0.0/24 port = 8080 -> 0.0.0.0/32
>>>> portmap
>>>> tcp 80:80
>>>> >
>>>> > (I'm not sure it it should be 80:80 or 80:81).
>>>>
>>>> I think it is better to just use a redirect on the internal side of
>>>> the firewall..
>>>
>>> That would not work, I guess, as the redirect will only trigger from
>>> the other side...
>>>
>>> -Guido
>
> Hi Guido,
> Yep, This did not work.
> I tried using 80:80 as well as 80:81.
>
> Please let me know if there is anything else that can be done.
>
> Thanks a lot
> -Dave

Update on this:
my setup is like this

                 tun1        tun0
192.168.0.0/24 ---------ipf------<internet>
                       4.1.3
This the rule that worked
map tun0 from  192.168.0.0/24 to any  port = 8080  -> 0/32 portmap tcp 80:81

But the thing is that instead of rewriting the destination port of the
outgoing packet it is rewriting the port of the gateway ip.
For e.g
I do telnet www.google.com 8080
This should get translated to www.google.com 80

However this is what actually happens


19/10/2004 23:10:45.495333 @1 NAT:MAP 192.168.0.132,32970 <- ->
69.142.151.X,80 [216.239.41.104,8080]

69.142.151.X is the gateway ip, where the port gets rewritten instead of
on the ip in [ ].



Thanks.



Reply via email to