Last active
June 26, 2023 01:12
-
-
Save pacmac/6b0d05a22fd328fbb907683968f6651c to your computer and use it in GitHub Desktop.
Create IP Tables for Zeroteir Gateway
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sysctl -w net.ipv4.ip_forward=1 | |
nano /etc/sysctl.conf | |
## Uncomment net.ipv4.ip_forward | |
PHY_IFACE=eth0; ZT_IFACE=zt3jnrnpfe; | |
iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE; | |
iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT; | |
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT; | |
apt install iptables-persistent | |
bash -c iptables-save > /etc/iptables/rules.v4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment