Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just did a test that told me my gateway (debian squeeze) responds when being pinged from outside.

It's a box with two network cards, eth0 is for my internal network ( and eth1 goes to "the internet" (as ppp0).

Making the gateway invisible when being pinged randomally would increase the safety.

What needs to be configured in order to make ppp0 (eth1) invisible, while eth0 still remains open?

share|improve this question
What do you want do do that for? Your system is certainly very much visible by all other network activity it participates in. – vonbrand Feb 25 '13 at 0:50
Realistically, it won't increase safety - ICMP is typically not the most useful tool attackers use, as it is often blocked at firewalls; instead they scan for specific ports and specific banners/headers being returned, as this identifies vulnerable services which the firewall is allowing through. – Rory Alsop Feb 25 '13 at 9:13
up vote 2 down vote accepted

You could achieve this by adding the following iptables rule that effectively drops the incoming ECHO requests on any ppp device:

iptables -A INPUT -p icmp --icmp-type 8 -i ppp+ -j DROP

This rule should be added before any rule that allows the ICMP traffic. I would not recommend you to disable all ICMP traffic as it may break the connectivity.

share|improve this answer
Wouldn't the wildcard for the interface have to be a + instead of a *, i.e. ppp+? -- Your sample line works for me if I use +, could it be it depends on the distribution? – zebonaut Mar 4 '13 at 8:46
@zebonaut yes, sorry. this is typo. I fixed the answer – Serge Mar 4 '13 at 13:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.