PiHole on on Ubuntu access Pihole from host PC (host macvlan)

Situation:

Running PiHole via Docker on Ubuntu 19.10, works well after setting up macvlan via docker-compose.yml. This is how I did it: https://github.com/zilexa/Mediaserver/blob/53ed1a13c7a1613a95ae927d0aa38803e57a38cb/pihole_docker-compose.yml
PiHole works fine, other devices in my LAN can access the /admin WebUI.

Problem:

The hostPC however cannot access the /admin WebUI. When you run PiHole on a RPi or Synology, you are not aware of this since you will only access the WebUI from another device (laptop, phone, PC).

Solution:

To make this work, another macvlan needs to be created, this time on the hostPC, not in docker:

ip link add mynet-shim link eno1 type macvlan  mode bridge
ip addr add 192.168.88.10/24 dev mynet-shim
ip link set mynet-shim up
ip route add 192.168.88.5 dev mynet-shim

After running these commands, I can access /admin WebUI from the hostpc itself :slight_smile:

Problem:

How can I make these commands stick? Because after rebooting the hostPC, the macvlan I created with those commands is gone, I have to run those commands again!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.