Get pihole listening on the local IPv4 and IPv6 addresses.

I'm not sure if the defaultNetwork subnet changes are necessary, I was trying
lots of stuff. There are some whitespace changes as well, don't get
distracted by them.

Most critically the --network=bridge is and the dns_enabled=false avoid
starting the aardvark-dns thing that podman does for internal dns on
port 53 and make it so the container gets the IPv6 address for listening
to incoming requests.
This commit is contained in:
Eli Ribble 2024-08-16 17:49:32 -07:00
parent c953a3b798
commit f44f8346f4
1 changed files with 19 additions and 7 deletions

View File

@ -305,23 +305,35 @@
autoStart = true;
environment = {
TZ = "America/Phoenix";
DNSMASQ_LISTENING = "all";
DNSMASQ_LISTENING = "all";
};
extraOptions = ["--network=bridge"];
image = "docker.io/pihole/pihole:2024.07.0";
ports = [
"192.168.1.5:53:53/tcp"
"192.168.1.5:53:53/udp"
"192.168.1.5:67:67"
"127.0.0.1:10000:80"
"53:53/tcp"
"53:53/udp"
"67:67"
"127.0.0.1:10000:80"
];
volumes = [
"/etc/pihole/config:/etc/pihole"
"/etc/pihole/dnsmasq.d:/etc/dnsmasq.d"
"/etc/pihole/dnsmasq.d:/etc/dnsmasq.d"
];
};
};
virtualisation.podman.enable = true;
virtualisation.podman.dockerSocket.enable = true;
virtualisation.podman.defaultNetwork.settings.dns_enabled = true;
virtualisation.podman.defaultNetwork.settings = {
dns_enabled = false;
ipv6_enabled = true;
subnets = [{
gateway = "10.88.0.1";
subnet = "10.88.0.0/16";
}
{
gateway = "fd00::1:8:1";
subnet = "fd00::1:8:0/122";
}];
};
}