Full Tunnel Mode

I intend to use a Cloud VM (ZT addr 192.168.2.151) to route all internet traffic through from another device (ZT addr 192.168.2.57) connected on ZT network.

Now, I’ve a CentOS based VM, with the following settings, as described in article for Full Tunnel Mode,

  1. /etc/sysctl.conf
net.ipv4.ip_forward = 1
  1. /etc/sysconfig/iptables (using MASQUERADE instead of SNAT)
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o ens3 -s 192.168.2.0/24 -j SNAT --to-source 140.238.254.203
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
-A FORWARD -i ztuku2ujvn -s 192.168.2.0/24 -d 0.0.0.0/0 -j ACCEPT
-A FORWARD -i ens3 -s 0.0.0.0/0 -d 192.168.2.0/24 -j ACCEPT
:OUTPUT ACCEPT [0:0]
COMMIT

I even started (and enabled) iptables,

systemctl enable iptables
systemctl start iptables

The default route on my ZeroTier Console looks like this,

I enabled “Route Via ZeroTier” on phone (ZT addr 192.168.2.57) and internet won’t work. At this point, I’ve tried everything - even tried routing internet through CentOS VM (ZT Addr 192.168.2.151) from another linux/windows powered machine. When enabling default mode on linux/windows machine ( sudo zerotier-cli set <networkId> allowDefault= 1), there’s no connection to the internet.

What am I doing wrong?

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.