mirror of
https://github.com/zyclonite/zerotier-docker.git
synced 2025-01-10 15:38:13 +01:00
ddb2636141
1. Rename files with "bridge" in the name to "router". 2. Edit file contents referring to "bridge" so they refer to "router". 3. Update README to reflect this change, plus point to the relevant link in the ZeroTier documentation. Signed-off-by: Phill Kelley <34226495+Paraphraser@users.noreply.github.com>
15 lines
348 B
Bash
Executable File
15 lines
348 B
Bash
Executable File
#!/usr/bin/env sh
|
|
set -Eeo pipefail
|
|
|
|
if [ "${1:0:1}" = '-' ]; then
|
|
set -- zerotier-one "$@"
|
|
fi
|
|
|
|
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
|
|
|
|
exec "$@"
|