zerotier-docker/scripts/entrypoint.sh
2022-01-30 12:28:43 +01:00

9 lines
275 B
Bash
Executable File

#!/usr/bin/env sh
PHY_IFACE=eth0
ZT_IFACE="zt+"
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
zerotier-one $@