Update NAT reflection (hairpinning, loopback etc.).md

This commit is contained in:
Kadigan KS/b/ 2018-12-30 00:52:01 +01:00
parent 2fdede70ec
commit b6f54dfa37

View File

@ -14,6 +14,7 @@ What you have to do is make sure your router redirects requests from _inside_ y
If you happen to be running `iptables` however, here's a line to get you started:
`iptables -t nat -A PREROUTING -i ! YOUR-WAN-INTERFACE -s LAN-NETWORK -d PUBLIC-IP -p tcp --dport PORT -j DNAT --to-destination LAN-SERVER-ADDRES`
Explanation:
- `-i ! YOUR-WAN-INTERFACE` is there to make sure you don't accidentally include traffic from the Internet - the traffic we want to modify is handled within the router itself (and also, it never hurts to prevent spoofing)
- `-s LAN-NETWORK` defines your LAN's network pool - for example `-s 10.0.0.0/8` - this is to make sure you're only affecting traffic originating from your local LAN