Replies: 7 comments 3 replies
-
Yes you probably can, but please provide more details about your specific goal so I can assist you. |
Beta Was this translation helpful? Give feedback.
-
I did not know that. Step 1: Enable IPv4 Forwarding
sudo sysctl -w net.ipv4.ip_forward=1 Step 2: Configure iptables for NAT and ForwardingReplace PHY_IFACE=eth0
ZT_IFACE=ztxxxxxxx
sudo iptables -t nat -A POSTROUTING -o $PHY_IFACE -j MASQUERADE
sudo iptables -A FORWARD -i $ZT_IFACE -o $PHY_IFACE -j ACCEPT
sudo iptables -A FORWARD -i $PHY_IFACE -o $ZT_IFACE -m state --state RELATED,ESTABLISHED -j ACCEPT After setting up your iptables rules, you'll want to make sure they are persistent across reboots. You can achieve this by installing sudo apt install iptables-persistent
sudo sh -c 'iptables-save > /etc/iptables/rules.v4' Step 3: Update ZeroTier Network ConfigurationIn your Ztnet network settings, add After completing these steps, you'll be able to route your internet traffic through the server, thereby bypassing any IP-based restrictions and allowing you to browse the internet as if you're in China. |
Beta Was this translation helpful? Give feedback.
-
Step 2: I don't understand. On my server ? I have no zt interface. Only on Clients. Or I am wrong ? |
Beta Was this translation helpful? Give feedback.
-
the client you want to route your traffic though must be connected to the zerotier network. When connected you will see a zerotier network interface starting with
That wont work. |
Beta Was this translation helpful? Give feedback.
-
Ah... Now I understand... Thanks.. I will test it.. If I have more Questions I will ask you. |
Beta Was this translation helpful? Give feedback.
-
Sorry.. Only One question... |
Beta Was this translation helpful? Give feedback.
-
I made a how-to in the docs. Does this help? |
Beta Was this translation helpful? Give feedback.
-
Hi..
my question is. Can I surf in china with my selfhosted zerotier server ?
Do I need some special settings ?
Thanks in advanced.
michael
Beta Was this translation helpful? Give feedback.
All reactions