21
submitted 8 months ago* (last edited 8 months ago) by ShitpostCentral@lemmy.world to c/selfhosted@lemmy.world

I'm trying to setup Wireguard to use as a VPN on my server using this guide. I currently run Pihole on the same machine.

LAN 192.168.1.*
WG 10.14.0.*
WG Server Addr 10.14.0.1
WG Client Addr 10.14.0.10

The handshake succeeds, and I can even ping IP addresses. However, it doesn't receive DNS responses. I checked in Wireshark and see the following:

WAN Client IP -> Server IP [Wireguard]
WG Client IP -> Server IP [DNS Request]
Server IP -> Server IP [DNS Request]
Server IP -> Server IP [DNS Response]
WG Server Addr -> WG Client Addr [DNS Response]
WG Client Addr -> WG Server Addr [ICMP Port unreachable]

I'm admittedly pretty inexperienced when it comes to routing, but I've been at this for days with no success. Any help would be greatly appreciated.

Edit

I now realize that it would have been relevant to mention the my Pihole instance was running inside a rootless podman container.

To test things further, I wrote a small echo server and spun it up on bare metal. Wireguard had no issues with that. My guess is that something between wireguard and specifically rootless podman was going wrong. I still don't know what, unfortunately.

My fix was to put Pihole in a privileged podman container with a network and static IP e.g. --net bridge:ip=10.88.0.230. I also put wireguard into a privileged podman container on the same network --net bridge. Finally, I set the peer DNS to the Pihole's static IP on the podman network (10.88.0.230).

As I said before, I still don't know why podman wasn't replying to the correct IP initially. I'm happy with my fix, but I'd still prefer the containers to be rootless so feel free to message me if you have any suggestions.

you are viewing a single comment's thread
view the rest of the comments
[-] ShitpostCentral@lemmy.world 1 points 8 months ago

No. I mean that my router doesn't forward requests for port 53 to my server. My server's firewall does allow access to port 53, and all my LAN devices are able to use it freely.

[-] krolden@lemmy.ml 1 points 8 months ago* (last edited 8 months ago)

So, you're running two exclusive DNS resolvers, one on your router and one on your pihole box? Or just one on the pihole box and using the local address of it for all LAN dns?

Why have a firewall on the pihole box at all? As long as it isnt in the DMZ you shouldn't need it. I would try disabling it completely and see if dns on your wg peers starts working.

[-] ShitpostCentral@lemmy.world 1 points 8 months ago

Just one on the pihole box and using the local address of it for all LAN DNS.

It is in the DMZ. I also use the box for Jellyfin so I want it remotely accessible.

I just tried disabling it for a short while with the same result. It still gets blocked in the 10.14.0.* network.

this post was submitted on 16 Oct 2023
21 points (92.0% liked)

Selfhosted

37809 readers
491 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS