0

I'm trying to set up a Pi Hole to run inside a LXC container on Ubuntu 22.04.

So far I successfully initialized LXC, created the container and installed Pi Hole. The host IP is 192.168.153.2. The container is running on a bridge network with the IP 10.123.145.237.

I then went on to set up a port forward to expose the DNS server of Pi Hole.

$ lxc network forward create lxdbr0 192.168.153.2
$ lxc network forward port add lxdbr0 192.168.153.2 udp 53 10.123.145.237 53
$ lxc network forward port add lxdbr0 192.168.153.2 tcp 53 10.123.145.237 53

My issue is that the DNS port does not get exposed, as expected. Checking the open ports I see the following:

foo@lol:~$ sudo lsof -i -P -n
[sudo] password for foo:
COMMAND    PID            USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
systemd-n  752 systemd-network   18u  IPv4  32403      0t0  UDP 192.168.153.2:68
systemd-r  754 systemd-resolve   13u  IPv4  28202      0t0  UDP 127.0.0.53:53
systemd-r  754 systemd-resolve   14u  IPv4  28203      0t0  TCP 127.0.0.53:53 (LISTEN)
sshd       842            root    3u  IPv4  24959      0t0  TCP *:22 (LISTEN)
sshd       842            root    4u  IPv6  24961      0t0  TCP *:22 (LISTEN)
sshd       974            root    4u  IPv4  26122      0t0  TCP 192.168.153.2:22->192.168.153.248:55434 (ESTABLISHED)
sshd      1136           foo      4u  IPv4  26122      0t0  TCP 192.168.153.2:22->192.168.153.248:55434 (ESTABLISHED)
dnsmasq   2360             lxd    4u  IPv4  40171      0t0  UDP *:67
dnsmasq   2360             lxd    6u  IPv6  40173      0t0  UDP *:547
dnsmasq   2360             lxd    8u  IPv4  40176      0t0  UDP 10.123.145.1:53
dnsmasq   2360             lxd    9u  IPv4  40177      0t0  TCP 10.123.145.1:53 (LISTEN)
dnsmasq   2360             lxd   10u  IPv6  40178      0t0  UDP [fd42:5a75:2593:62b9::1]:53
dnsmasq   2360             lxd   11u  IPv6  40179      0t0  TCP [fd42:5a75:2593:62b9::1]:53 (LISTEN)

I'd be very thankful for some advice, how to solve this!

foo
  • 1
  • 1

0 Answers0