My raspberry pi 4 running Ubuntu Server 20.4 suddenly stopped connecting to any services on the internet. I cannot pull from my github repository anymore, cannot make web requests to any APIs from my node application nor can I use apt install or apt update.
I have not changed any settings in my router and my firewall is disabled. Everything was working fine before. What may be causing this sudden issue?
Things that work
- ping www.google.com --> 64 bytes from lb-140-82-118-4-ams.github.com (140.82.118.4): icmp_seq=1 ttl=48 time=64.5 ms
Things that don't work
- sudo apt update --> Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease Cannot initiate the connection to ports.ubuntu.com:80 (2001:67c:1360:8001::22). - connect (101: Network is unreachable) Could not connect to ports.ubuntu.com:80 (91.189.88.150). - connect (111: Connection refused)
- curl www.google.com --> curl: (7) Failed to connect to www.google.com port 80: Connection refused
- curl https://www.google.com --> curl: (7) Failed to connect to www.google.com port 443: Connection refused
- git pull --> fatal: unable to access 'https://github.com/myuser/myrepo.git/': Failed to connect to github.com port 443: Connection refused
Not sure if this is in any way related to this, but one thing I did to prior to this issue is adding a user group and changing some permissions in order access GPIO data of my raspberry pi in ubuntu. Below I have attached part of my terminal history.
144 sudo chown root.gpio /dev/gpiomem
145 sudo chmod g+rw /dev/gpiomem
156 sudo groupadd gpio
157 sudo usermod -a -G gpio ubuntu
158 sudo grep gpio /etc/group
159 sudo chown root.gpio /dev/gpiomem
160 sudo chmod g+rw /dev/gpiomem