LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-10-2002, 04:05 PM   #1
oostevo
Member
 
Registered: Sep 2001
Location: Virginia
Distribution: OpenBSD/Mandrake 9/Redhat 8/Gentoo
Posts: 33

Rep: Reputation: 15
Denying Pings


Hi there.
I just installed Linux on my laptop, and I am quite satisfied with how secure I managed to get it, except for one thing:
The laptop can still accept pings. I would really like to be able to keep someone from pinging the computer.
Does anyone have any idea how to do this?

Thanks in advance,
oostevo
 
Old 08-10-2002, 04:18 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I'm in recycle mode, so check our forum:
here,
here,
and here. If it's iptables you want check out the guruz site mentioned in one of the posts. Even if the syntax differs, the basics remain the same tho.
 
Old 08-10-2002, 04:21 PM   #3
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
This command will block all echo-requests
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all

ICMP Broadcasting protection
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

ICMP Dead Error Messages protection
echo "1" > /proc/sys/net/ipv4/icmp_ignore_bogus_error_responses

Hope this helps

Last edited by neo77777; 08-10-2002 at 08:16 PM.
 
Old 08-10-2002, 04:24 PM   #4
JamesF1
Member
 
Registered: Nov 2001
Location: Spain
Distribution: Mandrake 9.1
Posts: 48

Rep: Reputation: 15
Set up iptables (or whatever firewall) to deny icmp packets. from the outside.
eg. iptables -A INPUT -p icmp DROP .....(or reject)

Mind you pings aren't such a big deal most of the time unless you're going to receive a lot this type of traffic.
 
Old 08-10-2002, 07:50 PM   #5
oostevo
Member
 
Registered: Sep 2001
Location: Virginia
Distribution: OpenBSD/Mandrake 9/Redhat 8/Gentoo
Posts: 33

Original Poster
Rep: Reputation: 15
Well, I realise that in most cases it is unnecessary to deny ICMP echos, but I am going to be wargaming with my friends using the laptop, and I don't want them to do something stupid like ping flood me.

Thanks for the information - it worked great(ly).
 
Old 08-10-2002, 08:28 PM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
This will log ICMP flooding

$IPTABLES -A INPUT -i $EXT_IF -p icmp --icmp-type echo-request -m limit --limit 12/hour --limit-burst 1 -j LOG --log-level $LOGLEVEL --log-prefix "ICMP flood: "

loging SYN flooding

$IPTABLES -A INPUT -i $EXT_IF -p tcp --syn -m limit --limit 12/hour --limit-burst 1 -j LOG --log-level $LOGLEVEL --log-prefix "SYN flood (Nmap SYN Scan?): "

where $LOGLEVEL=info
$IPTABLES=/sbin/iptables (in my case)
$EXT_IF=external_intrface (in my case ppp0)

For the above to work you need CONFIG_IP_NF_MATCH_LIMIT compiled as module in your kernel

Last edited by neo77777; 08-10-2002 at 08:29 PM.
 
Old 08-13-2002, 09:50 PM   #7
tied2
Member
 
Registered: Jun 2002
Location: Florida
Distribution: Redhat, FreeBSD, FC 6
Posts: 220

Rep: Reputation: 30
Make life easy, just use Firestarter and under advanced setup theres a option for icmp pings plus you can still ping out.

__________________________________
don't make me go back
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Denying URL's Maxx762 Linux - Wireless Networking 2 07-06-2005 04:46 PM
Web Server denying access. cjkeeme Linux - Networking 4 05-15-2005 04:38 PM
Iptables Denying Printing Crashed_Again Linux - Networking 5 09-21-2003 05:40 AM
Denying specific computer name.... vcheah Linux - Security 6 12-03-2002 01:31 AM
Denying telnet with message Infamous Tim Linux - Security 4 03-25-2001 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:38 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration