Tailscale vpn bypass firewall

Sometime, we need to bypass the firewall.

Suppose there are two linux box, a local box and a remote box, the local box unable to access some URL, due to the firewall limitation, while the remote box have no limitation.

We setup one tailscale vpn between these two nodes, as describe in https://tailscale.com/kb/1017/install

Now we config a exit node, to bypass the firewall of the local linux box.

Remore linux: Enable IP forward & Add exit-node:

sudo sed -i “s/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/” /etc/sysctl.conf

sudo sed -i “s/#net.ipv6.conf.all.forwarding=1/net.ipv6.conf.all.forwarding=1/” /etc/sysctl.conf

sudo sysctl -p /etc/sysctl.conf
sudo tailscale up --advertise-exit-node

Tailscale admin webpage: Approve the exit node

Local linux:  Use exit-node:

sudo sed -i "s/#net.ipv4.conf.all.rp_filter=1/net.ipv4.conf.all.rp_filter=2/"  /etc/sysctl.conf


sudo sysctl -p /etc/sysctl.conf

sudo tailscale up --accept-routes --exit-node-allow-lan-access --exit-node=RemoteIP

Where RemoteIP is the vpn ip of remote node, say 100.113.189.45