Script Zerotier sebagai remote gateway pada armbian server STB
Zerotier sudah terinstall di STB. link
Route between ZeroTier Network and Physical Networks Armbian Server STB B860H
1. Enable IP Forwarding
[Edit /etc/sysctl.conf to uncomment net.ipv4.ip_forward.]
sysctl -w net.ipv4.ip_forward=1
2. Configure iptables
a. [Modify physical network interface name, ZeroTier interface name.]
PHY_IFACE=eth0
ZT_IFACE=zt44xaj2sx
b. [Add rules to iptables]
iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT
iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT
c. [Save iptables rules for next boot]
apt install iptables-persistent
bash -c iptables-save > /etc/iptables/rules.v4
sumber : Andum Kawruh
Ditulis oleh rg_stealth
Rating Blog 5 dari 5
0 komentar :
Posting Komentar