LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Thread Tools
Old 10-08-2003, 08:50 PM   #1
joseph
Member
 
Registered: Jun 2003
Location: Batam
Distribution: Fedora Core 8 And Ubuntu 8
Posts: 408
Thanked: 0
DENY ICMP Packets


[Log in to get rid of this advertisement]
Dear All,

I want to deny all ping request, how to do that?
joseph is offline     Reply With Quote
Old 10-08-2003, 10:03 PM   #2
iceman47
Guru
 
Registered: Oct 2002
Location: Belgium
Distribution: Debian, Free/OpenBSD
Posts: 1,123
Thanked: 3
/sbin/iptables -A OUTPUT -p icmp -o eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type echo-reply -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type destination-unreachable -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp --icmp-type time-exceeded -s 0/0 -i eth0 -j ACCEPT
/sbin/iptables -A INPUT -p icmp -i eth0 -j DROP

this makes that outgoing pings are allowed, but incoming not.
integrate these lines in your iptables script
iceman47 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
ICMP Packets coolfrog Linux - Networking 4 12-22-2004 11:10 AM
dropping of ICMP packets from martian sources kishku Linux - Networking 2 10-19-2004 08:06 PM
How to send icmp packets on a particular interface? dravya Programming 3 07-29-2004 04:15 PM
Interpret ICMP packets SaTaN Linux - Networking 1 01-20-2004 10:23 PM
Port 0 (icmp,eth0,input) 7 packets wfhoney Linux - Security 3 09-02-2003 03:10 PM


All times are GMT -5. The time now is 06:53 PM.

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration