![]() Sudo iptables -t nat -P POSTROUTING ACCEPT If you have installed iptables-persistent, below single line will hand it sudo service iptables-persistent flush sudo iptables -F A POSTROUTING -o eth0LAN -p tcp -dport 80 -d 192.168.1.2 -j MASQUERADE * Due to MASQUERADE, internal web server sees request coming from firewall onlyÄ«elow are the same thing. ![]() A POSTROUTING -o lanIface -p tcp -dport 80 -d 192.168.1.2 -j MASQUERADE ![]() * MASQUERADE is required if LAN host gateway is not configured. Open port 443 to 3389 # WAN 443 to local 3389 (192.168.1.13) Local host's gateway is firewall so POSTROUTING not required. Sudo iptables -L OUTPUT -n -v -line-numbersÄelete a rule by its command sudo iptables -t nat -D POSTROUTING -o wan -j MASQUERADE Sudo iptables -L INPUT -n -v -line-numbers View running iptables rules sudo iptables-save > rules.txt
0 Comments
Leave a Reply. |