LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 05-18-2009, 11:49 PM   #1
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Rep: Reputation: 32
deny icmp


How to deny icmp to and from my server..I use below command in my iptables .. but not working:

iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d 192.168.1.123 -m state --state NEW,ESTABLISHED,RELATED -j REJECT
iptables -A OUTPUT -p icmp --icmp-type 0 -s 192.168.1.123 -d 0/0 -m stat
iptables -A OUTPUT -p icmp --icmp-type 0 -s 192.168.1.123 -d 0/0 -m state --state ESTABLISHED,RELATED -j REJECT

please help

thanks & regards
 
Old 05-18-2009, 11:50 PM   #2
Winanjaya
Member
 
Registered: Sep 2003
Posts: 239

Original Poster
Rep: Reputation: 32
iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -d 192.168.1.123 -m state --state NEW,ESTABLISHED,RELATED -j REJECT
iptables -A OUTPUT -p icmp --icmp-type 0 -s 192.168.1.123 -d 0/0 -m state --state ESTABLISHED,RELATED -j REJECT
 
Old 05-19-2009, 08:27 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by Winanjaya View Post
How to deny icmp to and from my server.
Example:
Code:
iptables -I INPUT -p ICMP -i eth0 -j DROP
iptables -I OUTPUT -p ICMP -o eth0 -j DROP
Keep in mind that filtering ICMP does have side effects.
 
  


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
never_direct deny all vs. always_direct deny all simplyrahul Linux - General 1 02-16-2005 02:42 PM
ICMP traffic archives/writing ICMP traffic in a file maia_1 Programming 0 07-20-2004 03:43 AM
What is ICMP? codedv Linux - Networking 2 01-04-2004 10:12 AM
DENY ICMP Packets joseph Linux - Software 1 10-08-2003 10:03 PM
Icmp mikeyt_3333 Linux - Security 1 08-09-2001 05:40 AM

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

All times are GMT -5. The time now is 07:51 PM.

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