I am operating Ubuntu 20.04 on VirtualBox, the thing is whenever I open the virtual machine a popup from nmcheck.gnome.org with the title HotSpot Login appears claiming that according to the network control policy, I have no privilege to access that website:
nmcheck.gnome.org popup
I have tried all sort of things to fix this, restarted the virtual machine, changed the DNS, changed the Connectivity setting of NetworkManager.conf to uri=https://nmcheck.gnome.org/check_network_status.txt. Even that does not work, I believe this is somehow related to my issue with apt-get not working, although firefox doesn't seem to show a probem, it returns this error:
apt-update error
I have tried hard to fix that the other way, firewalls are disabled. pinging to the ips stated in the apt-get update error message returns positive results. I had tried to delete and reinstall a virtual machine but this error persisted in the new machine. Without apt-get working i can't really proceed with the machine.
Edit 1
I tried changing the user agent string used by apt with the help of this guide, it didn't work. When I opened http://ros.org/, it showed the same error as the Hotspot login popup, however https://ros.org/ doesn't show that, so I tried changing every http to https in sources.list, it changed the error to apt-update error with https, Cannot initiate the connection to us.archive.ubuntu.com:443 (2001:67c:1562::15). - (101: Network is unreachable) Could not connect to us.archive.ubuntu.com:443 (91:189:81:38). - (111: Connect refused)
Edit 2
I had set apt to only use ipv4 by adding Acquire::ForceIPv4 "true" in 99force-ipv4. After that only 111: Connect refused error persisted.