For some reason your firewall is very active when you have no internet connectivity, try disabling UFW and see if the problem persists
It wouldn't hurt to do thisif iw is not installed for whatever reason thenCode:sudo iw reg set USThen repeat the sudo iw reg set US commandCode:sudo apt-get install iw
Bookmarks