I followed these instructions to run Pihole in a container on my rb5009. Pihole works fine. I created the VETH interface for it at 192.168.5.10 and can access its web ui from my LAN, which is 192.168.4.0/24.
What I’d really like is for it to appear on my LAN segment. I couldn’t get it to work by simply setting the VETH interface to 192.168.4.2. So I was thinking of setting up a pair of DNAT and SNAT rules to make it appear like it’s at 192.168.4.2 but I can’t get them to work.
I’ve tried a few versions of rules 2 and 3 - anyone see something I’m doing wrong?
You can add the VETH to you LAN bridge (or VLAN) in /interface/bridge/ports, and in /interface/veth use the 192.168.4.2 LAN IP and Mikrotik LAN address as gateway. No NAT required.
Oh I feel so dumb. I forgot to add it in /interface/bridge/ports. But I still can’t access the Pihole. Pinging 192.168.4.2 just gives “destination host unreachable”. I have restarted the container a few times. I have also added veth1 to the correct VLAN (VID 4).
Here’s the result of /interface export (though I deleted the Wireguard peers):
I was going to say that the VETH’s ip address/gateway sometimes gets “sticky” e.g. you change the VETH ip address, but the container still uses the old one. So recreating the container would fix that.