network manager – Ubuntu Internet Connection Not Starting Correctly

I have Ubuntu 18.04. I previously installed Red Hat’s Code Ready Containers, but it stopped me connecting to the Internet. I think it affected system.resolved with its use of dnsmasq. In my efforts to get it working I think I messed up how intenet connections work and I’m now experiencing the below weird behaviour:

  • If I connect to a VPN, although it says I’m connected, my IP and location are appearing as if I’m not
  • Also, when I start my laptop, the internet icon appears as an ‘?’. Despite this, I am connected to the internet as I can browse we pages etc. If I run

    sudo service network-manager restart

the icon appears again

I’m not sure where to even begin to fix this. Any help appreciated