Ping returns, "operation not permitted." Cannot connect to broadcast, or internet
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:
- Reconnect to the VPN and stay connected
- 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.
Solution 4
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:
$ nordvpn whitelist add subnet 192.168.0.0/16
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:
$ nordvpn whitelist remove subnet 192.168.0.0/16
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
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!
-
Prof.Chaos over 4 yearsLet me add: I had exactly the same problem as described above! (From one second to the other, without installing or updating anything!) The only possible cause: I've installed nordVPN a few days prior. Anyway, the suggestion here did not work for me. Strangely: in the second I turned the firewall on (I never used it before, so it was always off; I didn't even know that one was installed) I had internet again! Let me add: The situation is probably not resolved yet as I had to do the same after a reboot (the firewall doesn't stay on). Maybe I'll add my solution once I've resolved the issue.
-
BubbleGuppies about 4 yearsI 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.
-
localhost almost 4 yearsYou saved my day and my Ubuntu installation. I had exactly the same issue.
-
Niels Prins over 3 yearsTurning off the killswitch worked but i need it, "sudo iptables -F" fixed it! Thanks!
-
Brian Turek over 3 years
sudo iptables -F
removes ALL of your firewall rules. Depending on how the rule was created/saved in the first place, it could easily come back. You can be a bit more surgical by listing rules withiptables -L -n -v
and deleting specific rules withiptables -D
-
jonathan over 3 yearsremoving your entire list of iptables rules isn't a solution in most cases. it's possibly a very bad idea. as mentioned, it's also not permanent.
-
Luís de Sousa over 2 yearsIn spite of all the warnings in the comments above, flushing or at least modifying iptables is the only solution for this problem with nordvpn 3.10 on Ubuntu 20.04.