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

ServerIP still required? #956

Open
2 of 6 tasks
scara opened this issue Dec 27, 2021 · 16 comments
Open
2 of 6 tasks

ServerIP still required? #956

scara opened this issue Dec 27, 2021 · 16 comments
Labels
Help Wanted never-stale Use this label to ensure the stale action does not close this issue

Comments

@scara
Copy link

scara commented Dec 27, 2021

Hello Everyone,
it looks like ServerIP is still required, regardless the improvement in #944, documented in https://github.com/pi-hole/docker-pi-hole/tree/3f97e6e4fc37cb7077f336cfa6a048105c0e6867#recommended-variables.
These are the logs when starting the new docker image:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] 01-resolver-resolv: applying...
[fix-attrs.d] 01-resolver-resolv: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 20-start.sh: executing...
 ::: Starting docker specific checks & setup for docker pihole/pihole

  [i] Installing configs from /etc/.pihole...
  [i] Existing dnsmasq.conf found... it is not a Pi-hole file, leaving alone!
  [✓] Installed /etc/dnsmasq.d/01-pihole.conf
  [✓] Installed /etc/dnsmasq.d/06-rfc6761.conf
Applying pihole-FTL.conf setting REPLY_ADDR4=***.***.***.***
Setting DNS servers based on PIHOLE_DNS_ variable
::: Pre existing WEBPASSWORD found
  [✓] Setting admin contact to *********@********
DNSMasq binding to default interface: eth0
Added ENV to php:
                        "PIHOLE_DOCKER_TAG" => "2021.12.1",
                        "PHP_ERROR_LOG" => "/var/log/lighttpd/error.log",
                        "ServerIP" => "0.0.0.0",
                        "CORS_HOSTS" => "",
                        "VIRTUAL_HOST" => "********.********.home",
Using IPv4
...

This is a: Bug

Details

I assume ServerIP to be no more required but logs mention it so either it is still required i.e. not deprecated or logs should be fixed.

Related Issues

  • I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar

How to reproduce the issue

  1. Run the latest 2021.12.1 image - it's there since 2021-11
  2. Replace ServerIP with FTLCONF_REPLY_ADDR4, in the docker-compose you're running fine on 2021.10.1

These common fixes didn't work for my issue

  • I have tried removing/destroying my container, and re-creating a new container
  • I have tried fresh volume data by backing up and moving/removing the old volume data
  • I have tried running the stock docker run example(s) in the readme (removing any customizations I added)
  • I have tried a newer or older version of Docker Pi-hole (depending what version the issue started in for me)
  • I have tried running without my volume data mounts to eliminate volumes as the cause
@dschaper
Copy link
Member

I don't think I understand. Can you explain a bit more about what is broken or not working?

@scara
Copy link
Author

scara commented Dec 27, 2021

Hi @dschaper,
nothing is broken in terms of features but ServerIP is no more set as an ENV VAR by me but by the existing Dockerfile.

Being new to pi-hole code, at first glance it could be just a matter of fixing what written by logs by adding/removing relevant ENV VARs, at least adding FTLCONF_REPLY_ADDR4 too:

grep -E '(VIRTUAL_HOST|CORS_HOSTS|ServerIP|PHP_ERROR_LOG|PIHOLE_DOCKER_TAG)' "$PHP_ENV_CONFIG"
.

But... there are other places which look at ServerIP e.g.

validate_env() {
.
I feel that a cleanup should be required to remove the usage of ServerIP in several places, including tests:

Kind of two separate issues: this one to cleanup the logs and another one to actually deprecate ServerIP*.

HTH,
Matteo

@PromoFaux
Copy link
Member

Hiya, thanks for opening this issue. I made a similar note about this in a review comment for the PR that added the new FTLCONF_ variable. #944 (comment)

I feel that a cleanup should be required

Absolutely agree here! I filed it under "At some point in the future, I'll have the time and energy to sit down and untangle this from the repo" - and am yet to find the time or energy for 😏

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

@scara
Copy link
Author

scara commented Jan 28, 2022

Hi bot!

Based on #956 (comment) I think this could be the issue useful to track the vision of @PromoFaux .

HTH,
Matteo

@PromoFaux PromoFaux added never-stale Use this label to ensure the stale action does not close this issue Help Wanted and removed Submitter Attention Required labels Jan 28, 2022
@PromoFaux
Copy link
Member

Gosh, has it been a month already?

I've added the Help Wanted label just in case anyone else would like to dip their toes into the repo, too (and never-stale to stop the bot from marking it stale!)

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pihole-freezing-randomly-apparently/53200/7

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/local-dns-records-not-resolved-on-mobile-devices/53272/5

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/pihole-not-resolving-it-s-own-hostname/53396/4

@pralor-bot
Copy link

This issue has been mentioned on Pi-hole Userspace. There might be relevant details there:

https://discourse.pi-hole.net/t/finding-the-source-of-a-rebind/53449/20

@r2ixuz
Copy link

r2ixuz commented Jun 5, 2022

I stumbled upon this while I tried to use only non deprecated variables/settings. I need to bind the lighttpd listen address to a virtual eth interface while using docker mode host. With setting ServerIP ENV it works.

Readme says it is deprecated so I tried to use REPLY_ADDR4 only. This sets the listen interface to 0.0.0.0 as described by OP. Furthermore I read at https://docs.pi-hole.net/ftldns/configfile/ that REPLY_ADDR4 is also deprecated. That leaves me confused.

So, what is now or in the future the correct way to bind the lighttpd to one specific address while using docker host mode?

@labodj
Copy link
Contributor

labodj commented Aug 22, 2022

I stumbled upon this while I tried to use only non deprecated variables/settings. I need to bind the lighttpd listen address to a virtual eth interface while using docker mode host. With setting ServerIP ENV it works.

Readme says it is deprecated so I tried to use REPLY_ADDR4 only. This sets the listen interface to 0.0.0.0 as described by OP. Furthermore I read at https://docs.pi-hole.net/ftldns/configfile/ that REPLY_ADDR4 is also deprecated. That leaves me confused.

So, what is now or in the future the correct way to bind the lighttpd to one specific address while using docker host mode?

I second this.
This situation is very confusing.

docker-pi-hole readme

| `ServerIP` | Set to your server's LAN IP, used by web block modes and lighttpd bind address | `FTLCONF_REPLY_ADDR4` |

says to use FTLCONF_REPLY_ADDR4 instead of ServerIP
image

Pi-hole documentation says that REPLY_ADDR4 is deprecated, LOCAL_IPV4 must be used instead
image

@PromoFaux
Copy link
Member

Deprecated is not the same as removed. It's still there for now, and will be read by FTL, so the documentation is not incorrect. :)

Thanks, however, for the pointer - I will look at changing the suggested variable to use instead of REPLY_ADDR4

@r2ixuz
Copy link

r2ixuz commented Aug 25, 2022

Binding lighthttpd for IPv4 works now with the new Docker image when using FTLCONF_LOCAL_IPV4.

But IPv6 is still binding to every IP:

tcp6 0 0 :::80 :::* LISTEN 13884/lighttpd

I set FTLCONF_LOCAL_IPV6 and FTLCONF_LOCAL_IPV4 via my docker-compose file. ServerIP is not set.

Edit: Typo corrected.

@shaderecker
Copy link
Contributor

shaderecker commented Aug 29, 2022

Hi guys,
Is it also now somehow possible to bind two IPs with the FTLCONF_LOCAL_IPV4?
Use case is accessing the website from the host IP address and also a Virtual IP address.

Edit: Ah, just leaving out the vars completely sets LOCAL_IPV4=0.0.0.0. So that's fine for my use case.

@juliankrieger
Copy link

I stumbled upon this issue because I had no luck setting up pi hole correctly with the given documentation, or any of the information in this issue. I was get pihole to work with my local devices, but the local DNS functionality won't work.

I'm confused on how to correctly setup my docker-compose.yml.

It seems like there is a lot of conflicting information here. Would anyone mind updating the recommended example docker compose?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted never-stale Use this label to ensure the stale action does not close this issue
Projects
None yet
Development

No branches or pull requests

8 participants