DesktopECHO / Pi-Hole-for-WSL1

Ad-blocking DNS server for Windows • Unbound pre-configured • Deployment ready in minutes • Does not require hypervisor/docker
364 stars 54 forks source link

curl: (6) Could not resolve host: install.Pi-hole.net #106

Closed barateza closed 1 year ago

barateza commented 1 year ago

If curl is unable to resolve install.pi-hole.net, it will go from that point to the end and run all commands that were supposed to run.

REM -- Install Pi-hole -- Prevent the Pi-hole installer from running APT on this one occasion.  Unattended-upgrades package will keep Debian updated moving forward 
%GO% "mv /usr/bin/apt /usr/bin/apt.ph ; echo 'nameserver 9.9.9.9' > /etc/resolv.conf ; curl -L https://install.Pi-hole.net | PIHOLE_SKIP_OS_CHECK=true bash /dev/stdin --unattended ; mv /usr/bin/apt.ph /usr/bin/apt; update-rc.d pihole-FTL remove ; update-rc.d pihole-FTL defaults"

I believe that there should be a stop here if that file cannot be downloaded as there is crucial information in the file in order to continue, and installation will not complete properly.

Note that I can ping it:

C:\Program Files\Pi-hole>%GO% "ping install.pi-hole.net"
PING docker-2-ny1.pi-hole.net (164.90.255.4) 56(84) bytes of data.
64 bytes from 164.90.255.4 (164.90.255.4): icmp_seq=1 ttl=53 time=138 ms
64 bytes from 164.90.255.4 (164.90.255.4): icmp_seq=2 ttl=53 time=152 ms
64 bytes from 164.90.255.4 (164.90.255.4): icmp_seq=3 ttl=53 time=129 ms
64 bytes from 164.90.255.4 (164.90.255.4): icmp_seq=4 ttl=53 time=130 ms

I can also resolve websites such as https://google.com via curl:

C:\Program Files\Pi-hole>%GO% "curl -L https://plesk.com"

<!doctype html>
<html lang="en-US">

but still unable to resolve either install.pi-hole.net (or raw.githubusercontent.com for that matter.)

C:\Program Files\Pi-hole>%GO% "mv /usr/bin/apt /usr/bin/apt.ph ; echo 'nameserver 1.1.1.1' > /etc/resolv.conf ; curl -4 -L --dns-servers 1.1.1.1 https://raw.githubusercontent.com/pi-hole/pi-hole/master/automated%20install/basic-install.sh | PIHOLE_SKIP_OS_CHECK=true bash /dev/stdin --unattended ; mv /usr/bin/apt.ph /usr/bin/apt; update-rc.d pihole-FTL remove ; update-rc.d pihole-FTL defaults"
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0curl: (6) Could not resolve host: raw.githubusercontent.com
update-rc.d: error: unable to read /etc/init.d/pihole-FTL
barateza commented 1 year ago

It was a VPN issue, with VPN closed I was able to install and resolve.