No internet connection Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
Post Reply
mckart
Posts: 5
Joined: Sun Apr 04, 2021 6:49 pm

No internet connection

Post by mckart »

Hello,

I've been using dietpi on my rpi B (ver1) for a while without any problem. Today I was trying to install pihole via dietpi-software menu. While installation I got an error about not able to connecting to https://install.pi-hole.net. After that I checked internet connection of the rpi and i couldn't ping any page. I reboot rpi many times. I am connecting to my rpi through ssh via my laptop. So rpi is connected to local network but cannot connect to internet. Any idea?
mckart
Posts: 5
Joined: Sun Apr 04, 2021 6:49 pm

Re: No internet connection

Post by mckart »

I've found the problem. During installation process the record in /etc/resolv.conf changes to 127.0.0.1. After changing it to any DNS server ip, it starts working. Why the resolv.conf changes this way?
User avatar
Joulinar
Posts: 5115
Joined: Sat Nov 16, 2019 12:49 am

Re: No internet connection

Post by Joulinar »

usually this is not triggered by DietPi directly to adjus/change /etc/resolv.conf. Normal way to adjust DNS settings in DietPi would be using dietpi-config

Did you tried to set PiHole on some other way before? Or did you performed some other software installation upfront?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
mckart
Posts: 5
Joined: Sun Apr 04, 2021 6:49 pm

Re: No internet connection

Post by mckart »

I just upgraded dietpi to latest version prior installation. After first attempt I uninstall and install again. Same behaviour happened.
User avatar
Joulinar
Posts: 5115
Joined: Sat Nov 16, 2019 12:49 am

Re: No internet connection

Post by Joulinar »

that's strange. I did a test installation of Pihole without issues. As well my /etc/resolv.conf did not change and is still pointing to the DNS server I have setup before using DHCP.

Even more strange, as you are failing somewhere in the middle of the installation. Their are quite some steps before, like installation of Lighttpd, PHP, SQLite and Git Client, which require internet connection as well. Not sure what is going to change /etc/resolv.conf for you.

@MichaIng
Any ideas.
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
trendy
Posts: 342
Joined: Tue Feb 25, 2020 2:54 pm

Re: No internet connection

Post by trendy »

What's the output of:

Code: Select all

head -n -0 /etc/resolv.conf 
head -n -0 /etc/resolvconf/resolv.conf.d/*
User avatar
MichaIng
Site Admin
Posts: 3097
Joined: Sat Nov 18, 2017 6:21 pm

Re: No internet connection

Post by MichaIng »

Nothing is touching /etc/resolv.conf directly, neither in DietPi code nor in Pi-hole code. Probably the DHCP server is doing mad things, or dhcpcd, installed by Pi-hole as dependency (while not really being one). Purging and/or masking dhcpcd could be at least tested:

Code: Select all

apt purge dhcpcd5
systemctl mask dhcpcd
Then running the Pi-hole installer. I hope the mask does not break the package install. With this, it could be at least ruled out that dhcpcd has anything to do with it.
Post Reply