I'm in need of setting up multiple wg-quick
interfaces on a single machine, both using the real ethernet NIC directly, independently.
The issue I appear to be hitting is that through each of these I want to access the entire internet, which I assume means AllowedIPs = ::0
, but wg-quick
likes to add routes locally such that all traffic going anywhere will go through this new interface; including any following wg-quick
attempts..
Is there a way to call wg-quick
and tell it "hey, no, I'd like you to use specifically eno1
, not the 'default gateway'"? Perhaps using raw wg
?
I've tried reading a bunch online but I keep getting confused what others are asking when it seems like a similar question, but turns out to be hosting multiple wireguard services or something.
Depicted below is the basic gist, with two wg interfaces. wg0
in this instance is doing the normal wg-quick
thing of stealing all traffic transparently, where wg1
is an available interface where I can configure apps to specifically talk to it.
I don't mind if your solution has wg0
being forced to work this way, I can set up a SOCKS and HTTP proxy for software that do not support "use this interface/IP for traffic" flags to get the same effect.
Home ║ ISP ║ Internet
║ ║
║ ║
┌─────────────┐ ║ ║
│ │ ║ ║
│ │ ║ ║ ┌───┐
│ │ ║ ║ ╔══╪
│ eno1│ ║ ║ ║ └───┘
│ wg0 ┐│ ╙────────────────╜ ║ VPN0
│ ┐ └─────────────┘ ║
│ ╞════════════════════════════════════════╝
│ ┘ ╔════════════════════════════════════╗
│ wg1 ║ ┌─────────────┐ ║
│ ╓ ║ ┘│ router ║ ┌───┐
│ ╠═══╝ │ ╓────────────────╖ ╚══╪
│ ╙ │ ║ ║ └───┘
│ │ ║ ║ VPN1
│ │ ║ ║
└─────────────┘ ║ ║
PC
"Why?". Using openVPN my provider allowed open ports, basically local firewall permitting, I was publically routable and could host services on any number of ports I wanted. They've moved to wireguard, which is great, but they only support one open port per wireguard connexion. So basically for every app I had a port forwarded, I want to spin up a vpn interface for it.
Is this possible using just wireguard, no ip routes or anything?