Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate DHCP on first boot #26

Closed
Xyala opened this issue Dec 5, 2019 · 5 comments
Closed

Activate DHCP on first boot #26

Xyala opened this issue Dec 5, 2019 · 5 comments

Comments

@Xyala
Copy link

Xyala commented Dec 5, 2019

Thanks for sharing this, great project and it works amazing!

Quick question, I'm using the DHCP from the PiHole and I would like to see if there is a way to have it turned ON by default so that it's enabled straight from the start on first boot of the balena app.

And, of course, if there is a way to pre-set the DHCP settings (ip range, etc.)

Thanks!

@klutchell
Copy link
Owner

Is that something that is possible with the Pi-hole service itself, or the upstream image?

I would check the Docker Pi-hole repo or the Pi-hole Userspace to see if that is possible with command line arguments.

@Xyala
Copy link
Author

Xyala commented Dec 6, 2019

Good question, but if it would be possible it would be great.

I looked around the Docker Pi-Hole but if there is something about how it can be done it isn't clearly stated how.

I'm going to post on the Userspace forums.
Thanks!

@Xyala
Copy link
Author

Xyala commented Dec 6, 2019

Link to the forum : https://discourse.pi-hole.net/t/enable-and-set-pihole-dhcp-server-at-container-start/25894/3

I'm invited to reach out to who wrote the code haha.

@DigeratiDoge
Copy link

In CLI, you can use the enabledhcp command.

sudo pihole -a enabledhcp [from] [to] [router] [leasetime] [domain]

@klutchell
Copy link
Owner

Great, thanks @DigeratiDoge !

@Xyala you can try adding something like this as a final RUN command in your pihole/Dockerfile with your own values and see if you get the behavior you're looking for.

RUN pihole -a enabledhcp [from] [to] [router] [leasetime] [domain]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants