0

I have 2 question with iptables:

  1. How do I drop all input UDP traffic and port 53?

Iptables –A INPUT –p udp –m udp --dport 53 -j DROP is correct?

2 . How to forward all traffic from one port to another?

0

How do I drop all input UDP traffic and port 53?

$ sudo iptables -A INPUT -p udp --dport 53 -j DROP

How to forward all traffic from one port to another?

$ sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport $srcPort -j REDIRECT --to-port $dstPort

For more info, here

  • thanks mate, know, how can i check if this rules are working correctly? – sorianoasir Jan 21 '16 at 20:05
  • @sorianoasir Hmmmmm using some VM or enabling a port listener like nc and connect from other computer. – tachomi Jan 21 '16 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.