It’s been a few days since I’m not able to access internet from my FB, pretty much whenever the Debian 12 upgrade may have occurred. I thought at first that there was a problem with my firewall (I ended up reading and applying tips from Debian 12 (Bookworm) release and upgrading - #7 by Avron - but no luck).
Even after stopping the service (sudo systemctl stop firewalld.service), I get the following results upon an apt update or ping:
> sudo systemctl stop firewalld.service
> sudo apt update
...
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bookworm-updates/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/bookworm-security/InRelease Could not resolve 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-backports/InRelease Could not resolve 'deb.debian.org'
> ping google.com
ping: google.com: Name or service not known
Just in case, here’s the config of my external firewall-cmd zone:
Thanks @jvalleroy for your reply. Yes, I can ping 1.1.1.1:
> ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=60 time=2.01 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=60 time=0.995 ms
64 bytes from 1.1.1.1: icmp_seq=3 ttl=60 time=1.10 ms
...
I forgot to mention
there’s no additional firewall set up through DigitalOcean admin.
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to ::1#53: connection refused
;; communications error to 127.0.0.1#53: connection refused
; <<>> DiG 9.18.12-1-Debian <<>> debian.org
;; global options: +cmd
;; no servers could be reached
DigitalOcean’s DNS resolver addresses are:
67.207.67.2
67.207.67.3
Since my FreedomBox is installed on a DigitalOcean droplet, I added the following line in my /etc/resolv.conf file:
nameserver 67.207.67.2
I then managed to access internet from my FreedomBox and perform an update successfully!
However, after reboot, the nameserver 67.207.67.2 line disappears from /etc/resolv.conf. Is there a way to persist this line? Or maybe a better place to put it in?
Look into /etc/resolv.conf if there is not some comment that this file is generated by some tools used by DigitalOcean with explanations how to customize what is generated.
I have never used DigitalOcean but I have seen such a thing from another VPS provider.
If you are on Digital Ocean, first thing I’d check is if the Digital Ocean management packages are updated (droplet-agent and droplet-agent-keyring), since the /etc/resolv.conf file should just have the comment text you saw plus two lines for nameservers.
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "resolvectl status" to see details about the actual nameservers.
nameserver 67.207.67.2
nameserver 67.207.67.3
from one of my DO droplets.
However, your FB config may be overwriting this.
Log into your admin account, navigate System → Networks and click on the wired connection for your external path. Scroll through and see what the listed DNS server(s) are. If there are none set, try editing and setting the DO nameserver(s) there and see what happens.
Since you are on DO, snapshot it just in case you break something.