This script enables you to forward all traffic from a Tailscale exit node through a WireGuard tunnel.
Most mobile devices support only one active VPN connection at a time. As a result, users can't simultaneously use Tailscale for connectivity and route their internet traffic through another VPN. This script provides a workaround by turning a Tailscale exit node into a VPN bridge. When clients use this special exit node, their internet traffic is protected by the VPN while still maintaining Tailscale connectivity.
Requirements:
- Enable forwarding
- Tailscale need to run with
--netfilter-mode=[off|nodivert]
for manual routing control - Set
Table = off
in Wireguard config to manual control ip rules - Set
PostUp
andPreDown
script in Wireguard config