News:

The Latest electronic and computer Tips that work!

Main Menu

Iptables nat portforwarding

Started by branx86, September 16, 2015, 11:53:56 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

branx86

    iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 8080 -j DNAT  --to-destination 216.34.181.45:80
to see port inside of your LAN remove -i eth0 and it will be for all Lan connections.

Redirect just Ports

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-ports 8080