How would I translate this rules from ipchains/ipmasqadm to iptables:

  ipmasqadm portfw -a -P udp -L 10.0.0.4 5162 -R 192.168.1.200 5162

Would the following work:

 iptables -A PREROUTING -t nat -p udp -d 10.0.0.4 --dport 5162 -j DNAT
--to 192.168.1.200:5162
 iptables -I FORWARD 1 -p udp -d 192.168.1.200 --dport 5162 -j ACCEPT

Do I have the translation right, there?  Or did ipmasqadm do two-way
forwarding, and I need to do so with another set of rules like so:

 iptables -A PREROUTING -t nat -p udp -d 192.168.1.200 --dport 5162 -j
DNAT --to 10.0.0.4:5162
 iptables -I FORWARD 1 -p udp -d 10.0.0.4 --dport 5162 -j ACCEPT



Reply via email to