Jump to content

Pihole on Docker/WSL - DNS works, DHCP doesn't

JP!
On 8/26/2020 at 5:32 PM, JP! said:

I have Pihole on Docker on windows using WSL2.

 

When i try to disable the DHCP on my router to use Pihole as a DHCP, clients get no IP addresses.

 

Docker recomends using host mode for DHCP --network host, but it is not supported in Windows: https://docs.docker.com/network/host/

 

I have zero knowledge of containers / linux. Any thoughts?

 

JP

 

Link to comment
Share on other sites

Link to post
Share on other sites

On 8/30/2020 at 3:17 PM, JP! said:

I have changed my docker script to include ports for DHCP: -p 67:67/tcp -p 67:67/udp -p 68:68/tcp -p 68:68/udp

 

I have also enabled port forwarding on WSL using this command line: netsh interface portproxy add v4tov4 listenport=67,68 listenaddress=192.168.1.1 connectport=67,68 connectaddress=172.23.249.164

 

Still, clients get no IP when DHCP is disabled on router and enabled on pihole.

 

What else could i try?

JP

Link to comment
Share on other sites

Link to post
Share on other sites

How could i diagnose why devices get no IP in my network? Does my router need DHCP relay?

 

JP

Link to comment
Share on other sites

Link to post
Share on other sites

15 minutes ago, JP! said:

I have also enabled port forwarding on WSL using this command line: netsh interface portproxy add v4tov4 listenport=67,68 listenaddress=192.168.1.1 connectport=67,68 connectaddress=172.23.249.164

 

Still, clients get no IP when DHCP is disabled on router and enabled on pihole.

For the DHCP-server to work, it needs to be able to see broadcast-messages, so it needs low-level access to the network. Port-forwarding isn't enough.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, WereCatf said:

For the DHCP-server to work, it needs to be able to see broadcast-messages, so it needs low-level access to the network. Port-forwarding isn't enough.

That or DHCP relay would work as well.

Current Network Layout:

Current Build Log/PC:

Prior Build Log/PC:

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, WereCatf said:

For the DHCP-server to work, it needs to be able to see broadcast-messages, so it needs low-level access to the network. Port-forwarding isn't enough.

Thank you for the reply.

 

DNS doesn't need it them?

 

Is there a way to give it acess on my environment? Docker / WSL?

 

JP

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, JP! said:

DNS doesn't need it them?

For DHCP to work, the machines send a request to the network to find a DHCP-server. For DNS, you've already given them the IP-address, so there is no need for them to find it in the first place!

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Lurick said:

That or DHCP relay would work as well.

Thanks.

 

I have not found any setting or documentation that my router supports DHCP relay (Asus).

 

I have two Asus one as a router (AC-1200HP) and another as a AP (AC-52U). Anyway to activate DHCP relay on either one?

 

JP

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×