Re: Iptables problem

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

 



> Can anyonne please tell me how to open port 1500 to 1511 on my NAT box
> using iptable on slackeware ??
You have not written what do you want precisely, so i will give a few
examples. But PLEASE READ THE HOWTO, it is very informative. It is vital
to know how it all works.
I will assume TCP.
If you want to open these ports _to_ the NAT box use:
# iptables -A INPUT -p tcp --dport 1500:1511 -j ACCEPT

If you want to NAT these ports do:
# iptables -t nat -A PREROUTING -i $EXT -p tcp --dport 1500 -j DNAT \
	--to x.y.z.a

Remember that if doing 1:1 NAT requiers a similar rule for SNAT on
POSTROUTING.

If you want to NAT and change the ports do:
# iptables -t nat -A PREROUTING -i $EXT -p tcp --dport 1500 -j DNAT \
	--to x.y.z.a:other_port

of course read also:
# iptables -j DNAT --help
# iptables -j SNAT --help
# iptables -p tcp --help

Regards,
Maciej Soltysiak



[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