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:
parent
c953a3b798
commit
f44f8346f4
|
@ -305,23 +305,35 @@
|
||||||
autoStart = true;
|
autoStart = true;
|
||||||
environment = {
|
environment = {
|
||||||
TZ = "America/Phoenix";
|
TZ = "America/Phoenix";
|
||||||
DNSMASQ_LISTENING = "all";
|
DNSMASQ_LISTENING = "all";
|
||||||
};
|
};
|
||||||
|
extraOptions = ["--network=bridge"];
|
||||||
image = "docker.io/pihole/pihole:2024.07.0";
|
image = "docker.io/pihole/pihole:2024.07.0";
|
||||||
ports = [
|
ports = [
|
||||||
"192.168.1.5:53:53/tcp"
|
"53:53/tcp"
|
||||||
"192.168.1.5:53:53/udp"
|
"53:53/udp"
|
||||||
"192.168.1.5:67:67"
|
"67:67"
|
||||||
"127.0.0.1:10000:80"
|
"127.0.0.1:10000:80"
|
||||||
];
|
];
|
||||||
volumes = [
|
volumes = [
|
||||||
"/etc/pihole/config:/etc/pihole"
|
"/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.enable = true;
|
||||||
virtualisation.podman.dockerSocket.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";
|
||||||
|
}];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue