Ping returns, "operation not permitted." Cannot connect to broadcast, or internet

I've been attempting to figure this out for 5 hours now. Hopefully someone who is more knowledgeable, can help me out.

Randomly, without me making any changes to my device, my internet cut out. I tried to ping Google DNS, but was met with sendmsg: operation not permitted. I spent hours Googling this issue, and tried every solution known to man, with no success. If anything, I broke it even further.

Here is some helpful data:

$ cat /etc/network/interfaces 
auto lo
iface lo inet loopback

allow-hotplug wlp3s0
iface wlp3s0 inet dhcp
$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile,afono

[ifupdown]
managed=true
$ cat /etc/systemd/resolved.conf
[Resolve]
DNS=8.8.8.8
DNSStubListener=no

Excerpts from journalctl:

/etc/dhcpclient-enter-hooks.d/samba returned non-zero exit status 1
...
send_packet: Operation not permitted
...
dhclient.c: Failed to send 300 byte long packet over fallback interface
$ ping 8.8.8.8
ping: sendmsg: Operation not permitted
$ ping [broadcast IP] -b
ping: sendmsg: Operation not permitted

Thanks!


Solution 1:

I had the problem/resolution as Prof.Chaos. NordVPN has an "internet kill switch" that prevents you from accessing internet without the vpn active. Once I activated nordvpn internet worked. Fyi, for options in terminal type:

man nordvpn

To disable this killswitch (which now that you know about it you may not want to)

nordvpn set killswitch disable

Solution 2:

nordvpn set killswitch off

Above solution didnt worked for me.

It took me about an hour, but i found a solution:

sudo iptables -F

Solution 3:

I've run into this same exact problem on multiple Linux systems and the issue both times was with the NordVPN Linux client. If you enable the killswitch and then disconnect from the VPN, your Internet connection will get severely interrupted, as if the killswitch is still partially active. Command-line tools like ping and traceroute will often show "operation not permitted" errors and most websites won't load.

The workaround for now is to either:

  1. Reconnect to the VPN and stay connected
  2. Reconnect to the VPN, disable the killswitch, and then disconnect

I've reported this issue to NordVPN support, so hopefully it's something they'll be able to fix on their end.