Re: Port forwarding question

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

 



Hi all,
maybe you can try this
iptables -t nat -A PREROUTING -p tcp --dport 10000 -i ppp0 -m iprange
--dst-range 192.168.0.2-192.168.0.254 -j DNAT --to-destination
192.168.0.2-192.168..254

or check
http://iptables-tutorial.frozentux.net/iptables-tutorial.html#IPRANGEMATCH

Regards

Elvir Kuric



On 4/30/07, David <shadoweyez@xxxxxxxxx> wrote:
Hi all - first post, should be a simple question but google and the docs are not
helping

I want to forward port 10000 from internal hosts to the internet and it works with:

iptables -t nat -A PREROUTING -p tcp --dport 10000 -i ppp0 -j DNAT --to 192.168.0.2

for the host with ip 192.168.0.2, but how do I forward it for a range of hosts,
ie 192.168.0.2-192.168.0.254

I try

iptables -t nat -A PREROUTING -p tcp --dport 10000 -i ppp0 -j DNAT --to
192.168.0.2-192.168.0.254

but it does not work for any other hosts

iptables -L -v -t nat
gives the range, but does not actually forward the port in any apps
tcp dpt:10000 to:192.168.0.2-192.168.0.254

How do I forward the range of ports?
TIA,
David

==============================================
Running gentoo 2.16.18.4, iptables 1.3.5




[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