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!
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:
To disable this killswitch (which now that you know about it you may not want to)
Above solution didnt worked for me.
It took me about an hour, but i found a solution:
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:
I've reported this issue to NordVPN support, so hopefully it's something they'll be able to fix on their end.
Despite the fact that this tread is some older I still want to make a contribution for help. I ran into the same problem. After installing Nordvpn I couldn't reach my Network mfc (printer/scanner) anymore. Nor could I reach the IP address by ping. My solution was to make use of the Whitelist functionality. (for details see man page Nordvpn application).
Example 18. Whitelist subnet:
As soon as I whitelisted a range my MFC was in, the problem was solved. Hope I can make someone happy with this solution.
If it doesn't work for you, you can also undo and clear Whitelist by:
From the journalctl excerpt, it looks like your firewall, IPTables most likely is blocking DHCP requests. I'm guessing that the time before you lose internet is about the same as the DHCP lease time on your network. So when your computer tries to renew its IP address it is blocked.
I don't know how your firewall is set up. But you need to make sure that ports 67 and 68 are not blocked.
You could try running:
That should allow DHCP at least until next reboot