0

I'm trying to enable ICMP ping response from my Android 4.2.2 Phone (Galaxy S4). I am only considering ping over LAN via Wi-Fi, not the cellular network. WLAN Network connectivity is not the problem: I can connect to an FTP server running on the phone from another machine on the LAN. Pinging the phone from the same host of the FTP client results in timeouts. The phone is not asleep because the FTP session can be active, but ping still times out. I can also ping an Android 4.4 tablet just fine, so it is not something specific with Android.

In the phone, I examined /system/etc/sysctl.conf and found the line:

sysctl -w net.ipv4.icmp_echo_ignore_all=1;              

which I commented out as (editing with ES File Explorer Root Explorer, FS set to RW)

#sysctl -w net.ipv4.icmp_echo_ignore_all=1;              

After rebooting the phone, there is still no ping response. What other settings could inhibit ICMP ping response?

Edit: I also tried the form

sysctl -w net.ipv4.icmp_echo_ignore_all=0;     

That did not make a difference.

I can ping any other host on the LAN, including the router, from the phone using the Net Ping app.

I also discovered that I can ping the phone at its IPv6 link-local address (fe80::xxxx) It will respond to pings while the phone is awake, but as soon as the screen goes dark, ping responses stop. But I do not get any IPv4 ping response under any circumstances, so some setting is blocking it. I do not have any add-on firewall like DroidWall running.

6
  • Since this isn't usual Android behaviour, it might help to tell us what phone you have and what kind of network connection you're using.
    – Dan Hulme
    Aug 11, 2014 at 22:23
  • Samsung Galaxy S4 Rooted, Wi-Fi network.
    – tim11g
    Aug 12, 2014 at 13:09
  • Can you ping the other machine from the phone? Your Wi-Fi router could be blocking the echo requests.
    – Dan Hulme
    Aug 12, 2014 at 13:28
  • Yes, I have an app on the phone called Net Ping. I can ping any other host on the LAN, including the router.
    – tim11g
    Aug 12, 2014 at 15:07
  • I tried changing the sysctl.conf line to "sysctl -w net.ipv4.icmp_echo_ignore_all=0;", but still no ping responses
    – tim11g
    Aug 12, 2014 at 15:08

2 Answers 2

1

The simplest (and, of course, tricky) way is to use nping. For example:

nping -c <ping_count> --tcp -p <your_ftp_port_number> <ip_address_of_your_phone_hosting_ftp_service>

Achieve same goal without modification of Android.

0

I know this question is quite old now, but I came across this looking to for an answer and managed to work it out myself.

What I did was download a root file explorer (I used Root Browser from JRummy Apps) and navigate to /proc/sys/net/ipv4 edit icmp_echo_ignore_all so that it is a 1-line, 1-character file that simply says 0 (when I opened the file, it was set to 1)

No reboot, ICMP requests started working upon saving. Hope that helps someone else!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .