Code:
iptables –t nat –A PREROUTING –p udp –j DNAT –-to 192.168.0.1
This forces any UDP packets reaching your nat'ed interface to 192.168.0.1
Code:
iptables –P FORWARD ACCEPT
This sets the default policy for your FORWARD table to ACCEPT, basically, if a packet doesn't match any FORWARD rule, it will default to ACCEPT. Anything have to go from one interface to another will pass through the FORWARD table. Ex. at0 to eth0
Code:
iptables –-table nat –-append POSTROUTING –-out-interface eth0 –j MASQUERADE
This sets eth0 as your nat'ed interface

Originally Posted by
ioannou.alexandros
However I didn't specify any port number on the first line for udp and it worked fine! What is the reason that someone had used port 53 in the above tutorial? I know 53 is for DNS traffic but why port 80 is not specified somewhere since the victim can surf the internet.
Thank you very much!
The first command forces any udp traffic to 192.168.0.1, so if anyone tries to reach a udp service on the outside (tftp, etc..) it will not work (unless that service is running on 192.168.0.1). The reason you don't have to specify 80 is because their is no rule denying it, so it passes through your nat'ed interface without issue.