mirror of
https://github.com/dangeroustech/ZeroTierBridge.git
synced 2025-12-06 09:06:58 +00:00
fix: allow bi-directional traffic initiation
This commit is contained in:
@@ -7,8 +7,8 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
args:
|
args:
|
||||||
ARCH: arm64
|
ARCH: amd64
|
||||||
VERSION: 1.6.5
|
VERSION: 1.6.6
|
||||||
restart: always
|
restart: always
|
||||||
privileged: true
|
privileged: true
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -31,11 +31,12 @@ do
|
|||||||
|
|
||||||
if [ "$ZT_BRIDGE" = "true" ]
|
if [ "$ZT_BRIDGE" = "true" ]
|
||||||
then
|
then
|
||||||
echo "iptables on $(zerotier-cli get $n portDeviceName)"
|
echo "Configuring iptables on $(zerotier-cli get $n portDeviceName)"
|
||||||
PHY_IFACE=eth0; ZT_IFACE=$(zerotier-cli get $n portDeviceName)
|
PHY_IFACE=eth0; ZT_IFACE=$(zerotier-cli get $n portDeviceName)
|
||||||
|
|
||||||
iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
|
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 -t nat -A POSTROUTING -o $ZT_IFACE -j MASQUERADE
|
||||||
|
iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -j ACCEPT
|
||||||
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT
|
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user