How do I setup WireGuard to access my Linode VLAN.
Let's say I have wg0 setup at 10.255.255.0/24 and the Linode VLAN is setup at 10.0.0.0/24 How would I set it up so that my home computer has access to the VLAN?
Through the Cloud Manager, deploy a WireGuard Linode with the following Options:
Tunnel IP: 10.255.255.1/24
WireGuard Public Key (Client): <YOUR CLIENTS PUBLIC KEY>
Tunnel IP (Client): 10.255.255.2/24
Endpoint IP (Client): <YOUR CLIENTS IP ADDRESS> (get from https://whatismyip.com or whatever)
Region: Pick one where VLANS are available (Mumbai, IN; Toronto, ON; Sydney, AU; or Atlanta, GA at the time of this writing.)
VLAN: Create or Select Your VLAN
IPAM Address: 10.0.0.1/24
Make sure to include your VLAN in the Allowed IP's so that traffic to the VLAN is routed via WireGuard
PrivateKey = <YOUR CLIENT'S PRIVATE KEY>
Address = 10.255.255.2/24
PublicKey = <YOUR SERVER'S PUBLIC KEY> (Get from /root/wg-public.key)
AllowedIPs = 10.255.255.0/24, 10.0.0.0/24
Endpoint = <YOUR SERVER'S IP ADDRESS>:51820
Other VLAN Servers
Add a persistent static route for your WireGuard Client Network, i.e. for Debian:
iface eth1 inet static address 10.0.0.2/24 down ip route del 10.255.255.0/24 via 10.0.0.1 dev eth1 up ip route add 10.255.255.255.0/24 via 10.0.0.1 dev eth1
Equivalent for NetPlan would be this, right?
- to: 10.255.255.0/24
For configuring NetPlan, take a look at https://www.linode.com/community/questions/22510/how-do-i-configure-netplan-openvpn-vlan