iptables with DNAT target to multiple port range translation

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

 



Dear all,

I want to use iptables to set DNAT target. The multi-port virtual
server is the purpose that I want to do. But I found that DNAT cannot
map multi-port to destination multi-port. e.g.

iptables -t nat -A PREROUTING -p tcp --dport 1000:2000 -j DNAT
--destination 192.168.1.100:3000-4000

I think this rule should be
1000 ------> 3000
1001 ------> 3001
...........................
2000 ------> 4000

I tried to use whireshark to capture packets. No matter original
packets are 1000, 1001, 2000 and so on, they seem translate to port
3000 only. That's wired the iptables only mapping many ports to one
port.

Any advise ?

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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