Open laguill opened 2 months ago
After several attempts and exchanges with @tituspijean, I’ve made some progress on the solution. However, I still can’t reach my Yunohost server when I’m connected via Zerotier. I can only access it by connecting with the Zerotier network IP.
I don't know how to debug this issue
Here is what I currently wrote about this issue.
Open zerotierui or zeroUI to get the ip on the zerotier network.
Make sure that your server (for me, its IP is 10.0.0.3) and your client are on the same ZeroTier network and that they can ping each other with their ZeroTier addresses.
ping -c 5 10.0.03
Let’s ensure the server forwards traffic correctly.
sudo -i
mkdir -p /etc/yunohost/hooks.d/post_iptable_rules
touch /etc/yunohost/hooks.d/post_iptable_rules/95-zerotier
chmod +x /etc/yunohost/hooks.d/post_iptable_rules/95-zerotier
Get the name of the ZeroTier interface (it starts with "zt") and the primary network interface, like "eth0."
To get $WAN_IFACE
and $ZT_IFACE
ip address
In my case:
$WAN_IFACE = enp2s0
$ZT_IFACE = zt77dhnf6e
Then edit the file:
nano /etc/yunohost/hooks.d/post_iptable_rules/95-zerotier
Edit it according to your interfaces (add rules to iptables):
#!/bin/bash
# shell variables
export WAN_IFACE=enp2s0
export ZT_IFACE=zt77dhnf6e
# rules
iptables -t nat -A POSTROUTING -o $WAN_IFACE -j MASQUERADE
iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -i $ZT_IFACE -o $WAN_IFACE -j ACCEPT
exit 0
Run the script:
/etc/yunohost/hooks.d/post_iptable_rules/95-zerotier
Validate with iptables-save
(check that the lines with zt... are listed)
iptables-save
In the ZeroTier
network interface ➡️ Advanced
➡️ Managed routes
, make sure to have 0.0.0.0/0
via 10.0.0.3
.
I don't where to find the error If you can explain how to ping my server when I am connected only on zerotier network
Thanks you for your help
Hello,
I've recently installed ZeroTier UI, and it's working great for accessing my server using its ZeroTier network IP address. However, I would like to know if it's possible to make domain names reachable when connected to the ZeroTier network.
Thank you for your help!