Disabling ping requests

Azerate

Member
Dec 21, 2009
15
0
0
Basically i want my Android phone to stop responding to ping requests.

I tried searching but i found no solution to this matter.

Has anyone done this? What's the easiest solution to permanently prevent the phone from responding to ping requests?

My phone is rooted and running 2.1 if that helps.
 

Azerate

Member
Dec 21, 2009
15
0
0
Thanks for the reply!

This works great until i restart my phone.

What would be the best way to store this setting permanently?

I tried searching for an iptables config file but i couldn't find any.
 

athurh

Member
May 13, 2010
21
37
0
iptables has no config file, you need run a script with all rules.
In the market you can find Autostart (root) to run a script at boot.
 
Last edited:

Azerate

Member
Dec 21, 2009
15
0
0
I downloaded Autostart and then ran the following commands:

Code:
su
mkdir /data/opt
echo "iptables -A INPUT -p icmp -j REJECT" > /data/opt/autostart.sh
Then i rebooted, pressed "Allow Always" for Autostart and rebooted once more.

Still i can ping my phone. Did i do anything wrong? Any more suggestions?
 

athurh

Member
May 13, 2010
21
37
0
Check the rules with 'iptables -L -nv'
If nothing, try with the full path to iptables on the script (/system/xbin/iptables) and 'chmod 755 /data/opt/autostart.sh'