This is an automated archive.

The original was posted on /r/wireguard by /u/Puzzleheaded-Fact498 on 2024-01-22 01:29:20+00:00.


My setup

The config used in my laptop: client.conf

[Interface]
Address = 10.0.0.2/24
ListenPort = 51820
PrivateKey = OJ4ut77k0UGmKeTk21HrvJTT8sfxHxtbvRMRdtnvBEQ=
DNS = 1.1.1.1

[Peer]
PublicKey = Xbrev2jqgb3rXARRmayeHFZmbwWTGaNQQGFQ+Moc01Y=
Endpoint = RASPBERRYPI_PUBLIC_IP:51820
AllowedIPs = 0.0.0.0/0
PersistentKeepalive = 20

setup command: sudo wg-quick up ./client.conf

The config used in the raspberry pi server: server.conf

[Interface]
Address = 10.0.0.1/24
ListenPort = 51820
PrivateKey = uF0l0gIIHBPxQCPt0SHFeZRwIaaGA+s7kibunTasT3Q=
DNS = 1.1.1.1

[Peer]
PublicKey = y5bGZxEuaWpU9yX7UUwywjXLs7P2DDrTOJY+aQFMaEQ=
AllowedIPs = 10.0.0.2/32

setup command: sudo wg-quick up ./server.conf

I’m trying to setup a wireguard server on my friend’s raspberry pi. Everything went pretty smoothly, but the problem is that I cannot make a request to anything other than the server’s wireguard ip (10.0.0.1 in this case) on my laptop after running the setup command.

The handshakes are established (I can see the latest handshake: 48 seconds ago text when using sudo wg show on both my laptop and the server)

After running the setup commands on both machines:

  • pinging 10.0.0.1 on my laptop works
  • pinging 8.8.8.8 and 1.1.1.1 doesn’t work on my laptop
  • pinging 8.8.8.8 and 1.1.1.1 works in the raspberry pi
  • curl -L google.com doesn’t work on my laptop
    • After waiting for a while, curl returns curl: (6) Could not resolve host: google.com
  • curl -L google.com works in the raspberry pi
  • Setting up a temporary server on the raspberry pi using python -m http.server

Any idea on how I can fix the fact that I can only make request to 10.0.0.1 instead of all possible domains/IPs?