Help! I have inadvertently changed some setting on my Pi and now I can’t get internet availability by default at boot.
I can go in and change the nameserver FROM 127.0.0.1 TO 18.104.22.168 in /etc/resolv.conf This does give me internet availability until I reboot, Then the file is overwritten.
- I am accessing my Pi via SSH using another linux laptop running Debian.
- I was having trouble with my internet service in general and was using my laptop to diagnose. NOT my Pi.
- I was using a terminal window with tabs. One tab I was accessing my Pi via SSH. The other was looking at my laptop/debian system.
— THIS IS A RECIPE FOR DISASTER! ESPECIALLY IF DONE LATE AT NIGHT! HA, HA! —
So, yes, long story short, I MUST have inadvertently changed something dns related on my DietPi by mistake.
When the Pi rebooted it has no internet availabilty by default. I can get availability by changing the nameserver in resolv.conf manually. This will hold until I reboot. That file is overwritten by another.
I’ve looked up a few "fixes: on the internt, but most have me changing and modifying or creating new files to disallow reslov.conf from being overwritten. Really, I just want the system to operate as it should by default.
So, any thoughts on what I might change (back) to it’s default setting? Ideas on where to look?
Using dietpi-config then choosing the networking settings does show information as it SHOULD be, and my /etc/network/interfaces file looks right. Here is my /etc/network/interfaces file:
# Local auto lo iface lo inet loopback # Ethernet allow-hotplug eth0 iface eth0 inet static address 192.168.0.100 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 22.214.171.124 126.96.36.199
And here what is contained in my /etc/resolv.conf file:
And finally, here is what is listed in ethernet network settings through dietpi-config:
Current Details: │ - Mode = STATIC │ │ - Ip = 192.168.0.100 │ │ - Mask = 255.255.255.0 │ │ - Gateway = 192.168.0.1 │ │ - DNS = 127.0.0.1 │ │ │ │ Change Mode STATIC │ │ Copy Copy Current address to Static │ │ Static Ip 192.168.0.100 │ │ Static Mask 255.255.255.0 │ │ Static Gateway 192.168.0.1 │ │ Static DNS 188.8.131.52 184.108.40.206 │ │ Disable Disable Ethernet adapter │ │ Apply Save Changes (Restart Networking)