Managing PiHole in docker + macvlan over Wireguard VPN

    • Official Post

    but am just curious if you could elaborate? I assume you mean something like dnsmasq or opendns or unbound?

    No, none of that, it is an application owned by the router manufacturer.

  • Unfortunately, this script doesn't work for me. I have AdGuard Home on macvlan and this script does not connect me to it via VPN but to the openmediavault login



  • I'm not sure what I'm doing wrong, because after doing everything according to the instructions, I can access adguard in the LAN and ping from the host, but I can't see adguard outside the LAN through the wireguard vpn, which is also on the host.
    Is it possible that iptables should also be set to forward to macvlan network in the wireguard settings?


    Now I have it like this:

    Code
    PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE
    PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERADE


    Could this be a solution?

    Code
    PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -A FORWARD -i %i -o macvlan0 -j ACCEPT; iptables -A FORWARD -i macvlan0 -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE
    PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -D FORWARD -i %i -o macvlan0 -j ACCEPT; iptables -D FORWARD -i macvlan0 -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERADE


    Or maybe this?

    Code
    PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -A FORWARD -i %i -o macvlan0 -j ACCEPT; iptables -A FORWARD -i macvlan0 -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o enp1s0 -j MASQUERADE; iptables -t nat -A POSTROUTING -s 10.10.10.0/24 -d 192.168.1.0/24 -j ACCEPT
    PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -D FORWARD -i %i -o macvlan0 -j ACCEPT; iptables -D FORWARD -i macvlan0 -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o enp1s0 -j MASQUERADE; iptables -t nat -D POSTROUTING -s 10.10.10.0/24 -d 192.168.1.0/24 -j ACCEPT



    EDIT:

    Just to note that I am not using wireguard as an omv plugin but as an application installed on the host machine

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!