zerotier.is
AdLuoboyunAn account comes with 1 GB of trial traffic for 24 hours, used with Clash / MihomoPays by Alipay, WeChat, cryptoGet the trialLuoboyun: 1 GB on registrationFor 24 hours, Alipay / WeChat / cryptoGet the trialAd
  1. Home
  2. How to
  3. Browse through another device

Browse through another device

A VPS or Linux machine at home as a ZeroTier exit: forwarding, NAT, default route, Allow Default on the client, and rp_filter on Linux.

Going online through another device's connection
Going online through another device's connection Be User Group Wiki, Public domain

Think first

Any device that turns this on sends all its traffic out through the exit. Its bandwidth and place decide the result, not ZeroTier.

On the exit

Forwarding and NAT, use your adapter names
sudo sysctl -w net.ipv4.ip_forward=1
export ZT_IF=zthnhhqofq WAN_IF=eth0
sudo iptables -t nat -A POSTROUTING -o $WAN_IF -j MASQUERADE
sudo iptables -A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -i $ZT_IF -o $WAN_IF -j ACCEPT

In the console

Add a managed route: destination 0.0.0.0/0, Via the exit's ZeroTier address.

On the device that uses it

Phone (drawing)
SystemWhere
Windows, macOSAllow Default in the network details
Android, iOSRoute all traffic in the network settings
Linuxsudo zerotier-cli set NETWORK_ID allowDefault=1

Check

Open a site that shows your IP; it should be the exit's public address. If addresses work and names do not, DNS is missing.

  1. ping the exitno: authorization
  2. ping 8.8.8.8no: NAT
  3. open a siteno: DNS
In this order
Compared with a Tailscale exit node?

There it takes two clicks; here you write the rules and control everything.

On FreeBSD?

Allow Default is switched off there by ZeroTier for now.

Up nextYour own moon and relay

Pages nearby

Marks: ZeroTier full tunnel, ZeroTier default route, ZeroTier gateway