Skip to content

Need help with ping in linux

Locked Linux
16 2 6.4k 1
  • wrote on last edited by
    #1

    Unable to ping ip or host in linux
    I get this error
    ping: sendmsg: Operation not permitted
    I tried all the solutions listed on google none of them worked for me can anyone help me ping work in my ubuntu?

  • Unable to ping ip or host in linux
    I get this error
    ping: sendmsg: Operation not permitted
    I tried all the solutions listed on google none of them worked for me can anyone help me ping work in my ubuntu?

    wrote on last edited by
    #2

    @linuxbeginner Are you attempting to ping an IP address, or a hostname ?

  • @linuxbeginner Are you attempting to ping an IP address, or a hostname ?

    wrote on last edited by [[global:former-user]]
    #3

    @phenomlab both same error
    This is what I get when I ping ip
    466e31dc-2e1c-4722-96fa-894e048dc4da-image.png
    and when I ping host then this
    806503f3-41e9-482f-a2dc-5f4cc2f5cee5-image.png

  • @phenomlab both same error
    This is what I get when I ping ip
    466e31dc-2e1c-4722-96fa-894e048dc4da-image.png
    and when I ping host then this
    806503f3-41e9-482f-a2dc-5f4cc2f5cee5-image.png

    wrote on last edited by
    #4

    @linuxbeginner Can you provide the output of iptables -L ? It sounds very much like you are using SELINUX - which OS ?

  • @linuxbeginner Can you provide the output of iptables -L ? It sounds very much like you are using SELINUX - which OS ?

    wrote on last edited by
    #5

    @phenomlab I am using ZorinOS 16 based on ubuntu and I have just uninstalled iptables.

  • @phenomlab I am using ZorinOS 16 based on ubuntu and I have just uninstalled iptables.

    wrote on last edited by
    #6

    @linuxbeginner Typically, this means that you are not allowed to send ICMP packets. Are you sure you have removed iptables ?

  • @linuxbeginner Typically, this means that you are not allowed to send ICMP packets. Are you sure you have removed iptables ?

    wrote on last edited by
    #7

    @phenomlab Yes sir I removed it with sudo apt remove iptables
    see 4a31adb1-3663-450a-af79-0fe7df9284ec-image.png

  • @phenomlab Yes sir I removed it with sudo apt remove iptables
    see 4a31adb1-3663-450a-af79-0fe7df9284ec-image.png

    wrote on last edited by
    #8

    @linuxbeginner Try sudo apt install --reinstall iputils-ping and then re-try

  • @linuxbeginner Try sudo apt install --reinstall iputils-ping and then re-try

    wrote on last edited by
    #9

    @phenomlab Still same issue.

  • @phenomlab Still same issue.

    wrote on last edited by
    #10

    @linuxbeginner Are you using a VPN ?

  • @linuxbeginner Are you using a VPN ?

    wrote on last edited by
    #11

    @phenomlab I was using cloudflare warp now I disabled it but still the same issue.

  • @phenomlab I was using cloudflare warp now I disabled it but still the same issue.

    wrote on last edited by
    #12

    @linuxbeginner It’s not disabled. The IP address you logged in from here belongs to Cloudflare, so it’s still connected

  • @linuxbeginner It’s not disabled. The IP address you logged in from here belongs to Cloudflare, so it’s still connected

    wrote on last edited by
    #13

    @phenomlab It’s disabled I checked on whatismyip and it is showing correct location now.

  • @phenomlab It’s disabled I checked on whatismyip and it is showing correct location now.

    wrote on last edited by
    #14

    @linuxbeginner Then really the only thing we have left is permissions.

    Try sudo chmod 4711 /usr/bin/ping then attempt the ping again

  • @linuxbeginner Then really the only thing we have left is permissions.

    Try sudo chmod 4711 /usr/bin/ping then attempt the ping again

    wrote on last edited by
    #15

    @phenomlab Still same ac126db4-91be-4170-84cb-74d8825325b7-image.png

  • wrote on last edited by phenomlab
    #16

    Note to everyone else here. This user was formally banned from metabullet.com for abusing the service, and as a result, has been banned here also. Quite why this person thought it was ok to come here under the guise of an account he’d previously used at metabullet.com and hope I wouldn’t notice is beyond me.

    If you abuse my services once, you won’t get to use them again - period.

    As a reminder, the policies surrounding this service, and it’s usage can be found here

  • phenomlab phenomlab locked this topic on

Related Topics
  • To the Window to the Linux . . .

    Pinned Linux arch linux windows endoflife
    22
    19 Votes
    22 Posts
    8k Views
    Madchatthew
    @phenomlab said: @Madchatthew ouch. Sounds nasty. Did you get to the bottom of why it happened? I believe it is due to not everything getting upgraded because i wasn’t checking on the different packages I had installed from the AUR. Then when I ran yay it was like, hey would you like to update all of these things that you haven’t updated in months, perhaps years or ever for that matter and I was like yes please If you don’t have yay there are no notifications that you need more updates than what you realize. Chrome was staying updated because it would give me a notification, but there was the nvidia package that needed to be upgraded as well and I had never upgraded it. I didn’t realize it and should have. Then some of those packages use cmake and that needed to be updated as well. So using yay is beneficial to make sure you get all the updates you need.
  • Arch Linux | Reflector

    Linux arch linux pacman reflector updates
    4
    4 Votes
    4 Posts
    6k Views
    Madchatthew
    I have another update for reflector that I just figured out. You will want to edit the following file and add details to make sure that every time it updates the mirror list, it is grabbing them from your country and I grab 10 and sort them by rate. This will ensure that your mirrorlist isn’t getting populated with links from other countries which can slow down you downloads. sudo nano /etc/xdg/reflector/reflector.conf This is what the file looks like. # Reflector configuration file for the systemd service. # # Empty lines and lines beginning with "#" are ignored. All other lines should # contain valid reflector command-line arguments. The lines are parsed with # Python's shlex modules so standard shell syntax should work. All arguments are # collected into a single argument list. # # See "reflector --help" for details. # Recommended Options # Set the output path where the mirrorlist will be saved (--save). --save /etc/pacman.d/mirrorlist # Select the transfer protocol (--protocol). --protocol https # Select the country (--country). # Consult the list of available countries with "reflector --list-countries" and # select the countries nearest to you or the ones that you trust. For example: --country US # Use only the most recently synchronized mirrors (--latest). --latest 10 # Sort the mirrors by synchronization time (--sort). --sort rate Here are the different flag options that you can change or add to this file. I found this on google by searching arch linux reflector flags. Filtering Options (What to find) --country <CODE/Name>: Selects mirrors from specific countries (e.g., US, France,Germany). Use {Link: reflector --list-countries https://archlinux.org/mirrors/status/}, for a full list. --protocol <http|https>: Filters for HTTP or HTTPS mirrors. --age <hours>: Only includes mirrors synced within the last X hours (e.g., --age 12). --delay <hours>: Limits to mirrors with a reported sync delay of X hours or less (e.g., --delay 0.25 for 15 mins). --latest <N>: Limits results to the top N newest mirrors. Sorting Options (How to order) --sort rate: Sorts by download speed (requires testing, can be slow). --sort age: Sorts by most recently synced. --sort score: Sorts by overall score. --sort country: Sorts by country, useful with multiple countries. Output Options (Where to put it) --save <path>: Writes the filtered/sorted list to a file (e.g., /etc/pacman.d/mirrorlist). --verbose or -v: Shows detailed progress and mirror info.
  • Ubuntu 22.04 to Ubuntu 24.04 Unable to ping

    Locked Unsolved Linux ubuntu
    37
    3 Votes
    37 Posts
    13k Views
    abcabc123
    Okay, you have time, let me know
  • Linux on a Stick

    Linux linux usb arch
    29
    16 Votes
    29 Posts
    12k Views
    Madchatthew
    @DownPW I haven’t tried either of those, I am sure they run fast as well. Linux is so versatile it is awesome!
  • Linux Certification

    Linux linux certs
    4
    2 Votes
    4 Posts
    2k Views
    phenomlab
    @Madchatthew You might be sorry you asked This is the mentoring category below. Presently, it’s unused, but we have a dedicated area for it. https://sudonix.org/category/8/mentoring Other services https://sudonix.org/services
  • Arch Linux + Me = Crazy

    Linux arch linux web server vps
    10
    0 Votes
    10 Posts
    3k Views
    phenomlab
    @Madchatthew hmm, yes, that might be problematic.
  • 4 Votes
    11 Posts
    4k Views
    phenomlab
    @Hari Really? Can you elaborate a bit more here?
  • Digitalocean Ubuntu configuration

    Solved Linux
    33
    12 Votes
    33 Posts
    14k Views
    justoverclock
    @phenomlab thank you! not me