cBrandon Community

General Category => Linux Fixes => Topic started by: branx86 on September 16, 2015, 11:53:56 AM

Title: Iptables nat portforwarding
Post by: branx86 on September 16, 2015, 11:53:56 AM
    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