The VPN client just should have a connection to my server with ip address and all another internet requests shouldn't go through the VPN connection. So only the IP address can be called. So I install a VPN server with the IPTables rules:

iptables -t nat -A POSTROUTING -s -d -j MASQUERADE

It means, the VPN IP address just can call So the other requests like google.de doesn't work anymore after the VPN connection of course. Thats why I want make a VPN splitting. So I changed my VPN client configuration:

PrivateKey = ???????????=
Address =,???:???:???:???::4/64
DNS =,

PublicKey = ?????????=
PresharedKey = U????????=0=
Endpoint = im.secret.domain:51820
AllowedIPs =

But only my IP address is available but the other pages not (like google.com). Do you know why?


enter image description here

Requirement: Add: The PC is in a different network no 192.144.12, the PC has internet via LTE for example or this is in a hotel network. I want the user of the PC is able to connect to the Wireguard VPN server (Raspberry Pi2), he enter the address into the browser and the Http server from the Raspberry PI 2 response (On the Raspberry Pi2 the VPN Wireguard server and an HTTP server are installed). If the user of PC enters google.com in the browser, then the VPN connection should not be used (i.e. a split connection). If the user enters from the PC in the browser, then nothing should shown (so the Raspberry Pi1 should not response).

What was successfully implemented: The PC user can connect to the Wireguard VPN server. If the user of the PC enters in the browser, then the HTTP server is reachable (on the Raspberry Pi2), if the user of the PC enters in the browser, then nothing will shown (So Raspberry PI1 doesn't response).

Which does not work: If the user of the PC wants to call up google.com in the browser, then nothing appears because the call is made via the VPN connection and he cannot resolve the domain google.com . If I disconnect the VPN connection, the user via PC can open the page google.com

  • To clarify, you have the client, you have the wireguard peer it connects to (im.secret.domain) and you have "server with ip address" - three different machines? and it's the client that can only connect to once you start wireguard? Jul 5, 2023 at 0:27
  • @JaromandaX Thank you for the response. I add the picture to make the current situation more clearly. The VPN client has the IP address and the VPN server has the internal IP address, but the server is available via domain im.secret.domain. The connection to the server works, also the call to the server via address, but the client just can call this address nothing more.
    – Qeychon
    Jul 5, 2023 at 6:33
  • so, your wireguard vpn client is also your gateway to the internet? and you're using a fritz just for wireguard? why is the connection from the wg client to fritz labeled as "internet" Jul 5, 2023 at 7:07
  • 1
    I'm sorry but this really isn't clear at all, Qeychon. Please would you edit your post to explain what you want to achieve. Then explain how you're doing it. And finally include this existing description of what's not working. Use specific IP addresses and names (except your public one, if you like). Make sure your description is absolutely clear with regard to what IP address belongs to a client or the server Jul 5, 2023 at 8:06
  • @JaromandaX I change the description and the picture, to make it more clear (I hope), sry for that.
    – Qeychon
    Jul 5, 2023 at 10:19

1 Answer 1


Remove this line from the client's WireGuard config:

DNS =,

Usually you should include DNS settings in a WireGuard config file only when you need to access a DNS server through WireGuard itself.

The hotel network is probably blocking DNS resolvers other than its own, so if you want to use DNS over the hotel network, you probably have to use whatever DNS resolver it provides via DHCP.

  • Thank you so much, I will try it if it works.
    – Qeychon
    Jul 9, 2023 at 11:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .