Answer the question
In order to leave comments, you need to log in
How does iptables work?
Hello fellow smart people. There is this rule:
-A PREROUTING -d 0.0.0.0/32 -i eth0 -p tcp -m tcp ! --dport 22 -j DNAT --to-destination 10.200.1.5
Answer the question
In order to leave comments, you need to log in
second question. More difficult.It's actually not harder, google it in 10 seconds:
-A PREROUTING -d x.x.x.x -p udp --dport 1100:1200 -j DNAT --to-destination y.y.y.y
-A PREROUTING -i eth0 -p tcp -m multiport ! --dports 22,1100:1200 -j DNAT --to-destination 10.200.1.5
-A PREROUTING -i eth0 -p tcp -m multiport --dports 1:21,23:1100,1200:65535 -j DNAT --to-destination 10.200.1.5
-A PREROUTING -i eth0 -p tcp --dport 1:21 -j DNAT --to-destination 10.200.1.5
-A PREROUTING -i eth0 -p tcp --dport 23:1100 -j DNAT --to-destination 10.200.1.5
-A PREROUTING -i eth0 -p tcp --dport 1200:65535 -j DNAT --to-destination 10.200.1.5
-A PREROUTING -i eth0 -p tcp -m mport ! --dports 22,1100:1200 -j DNAT --to-destination 10.200.1.5
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question