Pi-hole is a network-level ad blocker that acts as a DNS liar and possibly a DHCP3 server for use on a private network. It is designed to be installed on embedded devices with network capabilities, such as the Raspberry Pi, but can be used on other machines running Linux or in virtualized environments.
## Using Pi-Hole as a DHCP server
> **Warning, you should be aware that touching your DHCP could break your network.
In case your server is inaccessible, you will lose your dns resolution and IP address.
Thus, you would lose any connection to the internet and even the connection to your router.**
> If you encounter this kind of problem, please read the section "How to restore my network".
There are 2 ways to configure Pi-hole to be used as your DHCP server.
- Either you can choose to use it when you install the application.
- Or you can activate the DHCP server afterwards in the "Settings" tab, part "Pi-hole DHCP Server".
In this second case, it may be preferable to force the server ip to a static address.
### Configure my router
Your router or your ISP's router has a DHCP server enabled by default.
If you keep this DHCP, along with Pi-hole's, you will have transparent conflicts between them.
The first DHCP server to respond will distribute its own ip and settings.
So you need to turn off your router's DHCP server and let Pi-hole manage your network.
#### Why should I use Pi-hole's DHCP?
By using Pi-hole's DHCP, you allow Pi-hole to give its dns configuration to each of your clients. This way, every request will be filtered by Pi-hole.
Another case of using Pi-hole DHCP is if you have hairpinning problems (you can't connect to your server because its ip is your public ip, and your router doesn't allow this).
In this case, using Pi-hole's dns will allow you to connect to your server by its local address rather than its public address.
+ Fix a bug or an improvement by creating a ticket (issue): [github.com - YunoHost-Apps/pihole/issues](https://github.com/YunoHost-Apps/pihole_ynh/issues)