copy of pihole as a reamke

Kayou cfa9c5a3db Merge pull request #66 from YunoHost-Apps/testing 4 лет назад
.github 155ef98249 [autopatch] Update issue and PR templates 5 лет назад
conf 85ec773f2f fix regenconf 4 лет назад
doc 84e7188049 fix 4 лет назад
hooks d34d953efb Fix #37 for post_domain_add 7 лет назад
scripts ddc5f3e709 set the new version number in upgrade script 4 лет назад
.gitignore 32af3e208d Première version du package 8 лет назад
CHANGELOG.md d15cac171c Update changelog 6 лет назад
LICENSE 32af3e208d Première version du package 8 лет назад
README.md f086fdb48e Auto-update README 4 лет назад
README_fr.md f086fdb48e Auto-update README 4 лет назад
YEP.md 5facd01339 Update package 8 лет назад
actions.toml faf8991522 remove action for dnsmasq 4 лет назад
check_process d2ab7d3ced Fix 4 лет назад
config_panel.toml d2ab7d3ced Fix 4 лет назад
dhcp.md 67a49f5b8c Rewrite english part of dhcp.md 6 лет назад
manifest.json bac742e976 bump version 4 лет назад

README.md

Pi-hole for YunoHost

Integration level
Install Pi-hole with YunoHost

Lire ce readme en français.

This package allows you to install Pi-hole quickly and simply on a YunoHost server. If you don't have YunoHost, please consult the guide to learn how to install it.

Overview

Network-wide ad blocking via your own DNS server

Shipped version: 5.4~ynh1

Screenshots

Disclaimers / important information

Configuration

Use the admin panel of your Pi-hole to configure this app. You may also need to follow the post-install guide to setup Pi-hole either as a DNS server or a DHCP server.

Limitations

  • Activate DHCP with Pi-hole needs manual configuration of your router.
  • Pi-Hole can't be updated beyond version 3.3.1, because higher versions use an integrated version of dnsmasq. This would require disabling the version of dnsmasq used by YunoHost.

Using Pi-hole as your DHCP server

Be careful, you should considering that playing with your DHCP may break your network.
In case your server is down, you will lose your dns resolution and ip address.
So, you will lose any internet connection and even the connection to your router.

If you encounter this kind of problem, please see "How to restore my network" at the end of this document.

How to configure Pi-hole

There're two ways to configure Pi-hole to be used as your DHCP server.

  • Either you can choose to use it when you install the app.
  • Or you can activate the DHCP server afterwards in the "Settings" tab, "Pi-hole DHCP Server" part.
    In this second case, it can be better to set the ip of the server to a static address

How to configure my router

Your personal router or ISP's router has a DHCP server enabled by default.
If you keep this DHCP, along with Pi-hole's one, you will have transparent conflicts between them.
The first DHCP to respond will distribute its own ip and settings.
So you have to turn off the DHCP of your router to let Pi-hole managed your network.

Why should I use only the DHCP of Pi-hole ?

By using the DHCP of Pi-hole, you allow Pi-hole to give at each of your client its dns configuration. This way every requests will be filtered by Pi-hole.

Another use case of using Pi-hole's 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 that).
In this case, using Pi-hole's dns will allow you to connect to your server by its local address instead of its public one.

How to restore my network

Oh crap !
Your Pi-hole server is down, and you don't have a DHCP anymore.
Don't panic, We'll get through it. \o/

Use your favorite terminal on your desktop computer.
And first, get your main interface (usually eth0).

sudo ifconfig

Then, set your ip as a static ip.

sudo ifconfig eth0 192.168.1.100

Now, you can connect to your router and turn on its DHCP server to use it again.
You can now reset your ip and get a dynamic address.

sudo ifconfig eth0 0.0.0.0 && sudo dhclient eth0

Don't forget to turn off the DHCP of your router if your server is working again.

Documentation and resources

Developer info

Please send your pull request to the testing branch.

To try the testing branch, please proceed like that.

sudo yunohost app install https://github.com/YunoHost-Apps/pihole_ynh/tree/testing --debug
or
sudo yunohost app upgrade pihole -u https://github.com/YunoHost-Apps/pihole_ynh/tree/testing --debug

More info regarding app packaging: https://yunohost.org/packaging_apps