Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 May 2008 18:53:51 -0400
From:      Julian Elischer <julian@elischer.org>
To:        Oleksandr Samoylyk <oleksandr@samoylyk.sumy.ua>
Cc:        freebsd-ipfw@freebsd.org
Subject:   Re: ipfw and smtp port rewriting
Message-ID:  <4830B37F.3020207@elischer.org>
In-Reply-To: <48307AAE.9010906@samoylyk.sumy.ua>
References:  <48307AAE.9010906@samoylyk.sumy.ua>

next in thread | previous in thread | raw e-mail | index | archive | help
Oleksandr Samoylyk wrote:
> Hello freebsd-ipfw,
> 
> I'd like to make smtp port rewriting for any destination by means of ipfw.
> 
> With iptables I just used this rule in order to achieve this functionality:
> 
> iptables -t nat -A PREROUTING -i ppp+ -p tcp --dport 2525 -j DNAT 
> --to-destination :25
> 
> Reading man ipfw and playing a bit with rules I composed this rule, 
> which doesn't however work:
> 
> ipfw add fwd any,2525 tcp from any to any 25 via ${tun}
> 
> How to achieve the same functionality as in iptables for smtp port 
> rewriting for any destination?
> 
> Thanks!
> 

in current (and I think 7.0) you can use the 'nat' keyword
and may be able to achieve something with that.. just an idea.

fwd doesn't change the packet, jsut what you DO with the packet so
'fwd'ing to a different port is only effective if you are accepting 
the packet yourself, and not if you are sending it to the next hop.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4830B37F.3020207>