Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-03-2006, 03:47 PM
|
#1
|
Member
Registered: Dec 2005
Posts: 41
Rep:
|
how can i stop ping reply?
hi everybody , i have newbie question
how can i stop ping reply videlicet how can i stop reply if anybody ping my IP , or just got my IP but don't got reply?
and sorry for bad english .
|
|
|
02-03-2006, 03:51 PM
|
#2
|
LQ Guru
Registered: Dec 2005
Location: Somewhere on the String
Distribution: Debian Wheezy (x86)
Posts: 6,094
|
I believe you just need to install a firewall and configure it to drop all packets.
|
|
|
02-03-2006, 04:23 PM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
As root
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
This will block all icmp requests.
To make this a permanent settings, add the line below to /etc/sysctl.conf
net.ipv4.icmp_echo_ignore_all = 0
As pljvalez suggested, you can also set a firewall rule to disable icmp reply.
|
|
|
02-03-2006, 06:05 PM
|
#4
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
pljvaldez thank you but i wanna stop ping without firewall
ppuru thanks it's worked , but i try to edit sysctl.conf and put what you say but it dosn't worked
anyway thank .
Last edited by Guru Mind; 02-03-2006 at 06:06 PM.
|
|
|
02-03-2006, 06:14 PM
|
#5
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
gurumind, my apologies, set
net.ipv4_icmp_echo_ignore_all = 1
to stop pings. setting it to 0 allows pings.
|
|
|
02-03-2006, 06:33 PM
|
#6
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
ok ppuru , but would i must restart service or something like that?
and really thanks ppuru .
|
|
|
02-03-2006, 06:37 PM
|
#7
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
no need, the next time you reboot your system, the icmp_echo_ignore_all will be set.
|
|
|
02-03-2006, 09:41 PM
|
#8
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep: 
|
You don't need to reboot to make the settings take effect. If you've added the line to /etc/sysctl.conf, as root type sysctl -p
|
|
|
02-04-2006, 06:35 AM
|
#9
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
after i type sysctl -p
error: "net.ipv4_icmp_echo_ignore_all" is an unknown key
any suggeste?
|
|
|
02-04-2006, 06:41 AM
|
#10
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by Guru Mind
after i type sysctl -p
error: "net.ipv4_icmp_echo_ignore_all" is an unknown key
any suggeste?
|
try changing the first underscore to a period... like this:
Code:
net.ipv4.icmp_echo_ignore_all
|
|
|
02-04-2006, 08:59 AM
|
#11
|
LQ Newbie
Registered: Feb 2006
Posts: 13
Rep:
|
This is slightly off topic.
I know there is a way in which you can configure some message to be displayed when someone tries to ping our machine. Does anyone know how that is done?
|
|
|
02-04-2006, 09:07 AM
|
#12
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally Posted by iNeo
This is slightly off topic.
I know there is a way in which you can configure some message to be displayed when someone tries to ping our machine. Does anyone know how that is done?
|
well, if you filter the pings with regular iptables instead of sysctl.conf it's just a matter of adding a LOG target rule... so anytime someone pings you it will show-up in /var/log/syslog:
Code:
iptables -I INPUT -p ICMP --icmp-type 8 \
-m state --state NEW -j LOG
|
|
|
02-04-2006, 01:34 PM
|
#13
|
LQ Newbie
Registered: Nov 2003
Posts: 24
Rep:
|
are you suing a gui? check out he iptable instface guarddog
|
|
|
02-04-2006, 05:21 PM
|
#14
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
Quote:
Originally Posted by win32sux
try changing the first underscore to a period... like this:
Code:
net.ipv4.icmp_echo_ignore_all
|
Thanks win32sux, sorry for the typo Gurumind.
net.ipv4.icmp_echo_ignore_all is the correct key.
sysctl -a gives a list of all settable parameters. Play around at your own risk.
|
|
|
02-04-2006, 06:17 PM
|
#15
|
Member
Registered: Dec 2005
Posts: 41
Original Poster
Rep:
|
Thanks win32sux and ppuru for help
it's working now
|
|
|
All times are GMT -5. The time now is 03:40 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|