iptables port fowarding rules help ..

Hervé Fache Herve at lucidia.net
Thu Dec 14 10:13:20 UTC 2006

On 12/14/06, John L Fjellstad <john-ubuntu at fjellstad.org> wrote:
> Basically, your rule
> iptables -t nat -A PREROUTING -p tcp -i eth1 -d xxx.xxx.xxx.xxx --dport
> 5279 \
> --sport 5279 -j DNAT --to
> says a tcp package coming in on interface eth1 with destination
> xxx.xxx.xxx.xxx and destination port 5279 AND with source port 5279 gets
> sent to on port 5279
> I'm thinking this rule is too specific (does it really come from port
> 5279?)

And I did not see (but I looked very quickly) whether you had a rule
to allow input of the port, like:
iptables -A INPUT -i eth1 --dport 5279
I remember doing port forwarding and needing both the  INPUT and
FORWARD rules for it to work (but I have been wrong before ;-).


More information about the kubuntu-users mailing list