Re: Port forwarding doesn't work.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Herman,

did you try something like

iptables -t nat -I PREROUTING  -d x.x.x.x -j DNAT --to destination y.y.y.y

where you can add also protocol,port.....
Important is also that the destination machine routes back the packets via the nat machine or you must specify an additional POSTROUTING roule so that it looks for the destination machine that the pakets are originated from the nat machine.
Perhaps an example to the PREROUTING roule.

iptables -t nat -I POSTROUTING -d y.y.y.y -j SNAT --to-source z.z.z.z
then z.z.z.z should be bind to the natting machine.

works for iptables 1.2.7a

greetings
Gerd

Am Son, den 12.10.2003 schrieb Herman um 22:11:
Has anybody got me a *working* port forwarding rule please???

This thing is driving me nuts, since the rules straight from the manuals don't 
work with 1.2.7a or 1.2.9rc1.

Cheers,

[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux