Redirecting a port to a local machine inside our network
If we want to redirect a port (Like the http port) to one of our network machine we should use this IPTables rule:
iptables -t nat -A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination 192.168.0.x
iptables -t nat -A POSTROUTING -p tcp -d 192.168.0.x --dport 80 -j SNAT --to-source 192.168.0.y
Recent comments