naggie / dsnet

FAST command to manage a centralised wireguard VPN. Think wg-quick but quicker: key generation + address allocation.

Home Page:https://calbryant.uk/blog/how-to-set-up-a-wireguard-vpn-in-minutes-with-dsnet/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Client machines can't talk to each other

kstenerud opened this issue · comments

I tried the following:

  • dsnet init
  • dsnet add x2
  • wg-quick up <my new config> on each client machine (ubuntu 20.04)

The machines connect to the server and can ping the server over the VPN address, and the server can ping the clients, but the clients can't ping each other. Is there something I missed?

sudo dsnet up is missing after dsnet init, but as the server/clients can ping each other it's probably something else. Is this a fresh install? Perhaps there is a firewall rule, or maybe the server/clients something misconfigured with the routing table outside of dsnet. What does ip route say? (assuming linux)

Oh yeah, I did a dsnet up :)

This is a fresh VPS instance (ubuntu 20.04) that I've only installed dsnet on.

# ip route
default via 10.18.80.204 dev ens2 proto dhcp src 10.18.80.205 metric 100 
10.5.0.0/22 dev dsnet proto kernel scope link src 10.5.0.1 
10.18.80.204 dev ens2 proto dhcp scope link src 10.18.80.205 metric 100 
10.18.80.204/31 dev ens2 proto kernel scope link src 10.18.80.205 
# iptables --list
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Found the problem. IP forwarding wasn't enabled by default.

sysctl -w net.ipv4.ip_forward=1

@kstenerud , you'll want to update /etc/sysctl.conf too so the changes persist over a reboot.

If you want IPv6 forwarding to work, you'll also need to run sysctl -w net.ipv6.conf.dsnet.forwarding=1, and put the corresponding line in /etc/sysctl.conf assuming you are using dsnet as your interface name!

Hm. I have net.ipv4.ip_forwarding set to 1 and I have this issue. I can ping between the hub and the spokes, but not between the spokes.