On Tue, Feb 21, 2006 at 02:52:19PM -0500, Artom Lifshitz wrote:
> Hello,
> 
> I have a small home LAN with a FreeBSD 6 machine as the router. I got
> NAT to work, otherwise I wouldn't be posting this. But I can't get port
> redirection to work.
> 
> I want to redirect aMule's ports (4662 TCP, 4665 UDP and 4672 UDP) to
> `arlon' 192.168.1.2 on the LAN, so my /etc/ipnat.rules looks like:
> 
> map tun0 192.168.1.0/24 -> 0/32
> rdr tun0 0/32 port 4662 -> 192.168.1.2 port 4662
> rdr tun0 0/32 port 4665 -> 192.168.1.2 port 4665 udp
> rdr tun0 0/32 port 4672 -> 192.168.1.2 port 4672 udp
> 

This should work. Have you checked with ipnat -lv if the rdr state
is created?

> Then I find out that incoming NAT happens before filtering, so I add
> pretty liberal pass lines to my /etc/ipf.rules.script, which now looks like:

> pass in quick on $eif proto tcp from any to any port=4662
> pass in quick on $eif proto udp from any to any port=4665
> pass in quick on $eif proto udp from any to any port=4672

Why not:
pass in quick on $eif proto tcp from any to 192.168.1.2 port=4662 keep state
ect?

-Guido

Reply via email to