Skip to content

Instantly share code, notes, and snippets.

View allenbyus's full-sized avatar
🚎

Taylor Allen allenbyus

🚎
View GitHub Profile
@allenbyus
allenbyus / snat_dnat_advantech.md
Created May 28, 2020 23:21 — forked from tomasinouk/snat_dnat_advantech.md
examples of SNAT, DNAT with iptables for Advantech, Conel routers, with comments (probably will work on other routers where iptables can be manipulated, care needs to be taken on applying these commands after reboot)

Some examples of SNAT, DNAT with iptables with comments

mainly used in start-up script

masquarade all outgoing packets to be WLAN0 IP

iptables -t nat -A PREROUTING -s 192.168.1.2 -i eth0 -j MASQUERADE

All packets leaving eth0 will have src eth0 ip address