diff --git a/entrypoint.sh b/entrypoint.sh index bd8f0fc..84a0b16 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -14,7 +14,7 @@ do sleep 1 done -echo "joining networks: $ZT_NETWORK" +#echo "joining networks: $ZT_NETWORK" echo "joining $ZT_NETWORK" @@ -23,18 +23,15 @@ do echo "joining $ZT_NETWORK failed; trying again in 1s" sleep 1 done - +# Print Client Info +echo "$(zerotier-cli info)" ### Set IPTables to allow NATting -echo "setting up NATting" -sysctl -w net.ipv4.ip_forward=1 +sysctl -w net.ipv4.ip_forward=1 > /dev/null PHY_IFACE=eth0; ZT_IFACE=$(ls /sys/class/net | grep ^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 -echo "iptables --list-rules" -echo "$(ip a)" - sleep infinity \ No newline at end of file