jedisct1 / dsvpn

A Dead Simple VPN.
MIT License
5.17k stars 395 forks source link

Can I use this over Wireguard, and just tunnel UDP traffic over it? #71

Closed Marctraider closed 4 years ago

Marctraider commented 4 years ago

Using Wireguard for a redundant setup right now (all packets get duplicated) basically my whole internet goes through it. But for reasons (Proper packet sequence, packet order, out of order) i want to tunnel my network-wide udp packets over DSVPN that runs over the wireguard tunnel.

So basically Internal network UDP packets -> DSVPN -> Wireguard -> DSVPN -> UDP.

How does dsvpn work with routes, you describe that it works out of the box so it already touches routes and stuff itself?

Edit: Mhh, If NO_DEFAULT_ROUTES has been defined, default routes will not be installed. Guess that helps!

jedisct1 commented 4 years ago

Haha, you beat me to it :)

Yes, compiling with NO_DEFAULT_ROUTES will enable the VPN interface without setting up the routes.

So, redirecting only UDP traffic to that interface definitely looks doable. I'm not familiar enough with Linux to know the exact ip route and nft commands to do it, but it shouldn't be too difficult to find.

Marctraider commented 4 years ago

Thanks!

I got dsvpn tunnel working over redundant wireguard tunnel (1440 mtu) for UDP packets.

Just curious what mtu i should set for tun0, i.e. what is the overhead?

Thx!

jedisct1 commented 4 years ago

Overhead per packet is 18 bytes.