Linux / UNIX Tech Support Forum
This is a discussion on Blocking port in iptables within the Linux software forums, part of the Linux Getting Started category; hi i'm trying to block icmp applying this rule iptables -A INPUT -p icmp -s \! 192.168.2.26 -j DROP i ...
|
|||||||
| Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
hi
i'm trying to block icmp applying this rule iptables -A INPUT -p icmp -s \! 192.168.2.26 -j DROP i want to allow this host 192.168.2.26 except all, but this rule don't work it block also icmp request from this host. Any Help... Regards Asim |
| Sponsored Links | ||
|
|
|
||||
|
So you are applying rules on host having ip 192.168.2.26?
__________________
Vivek Gite Linux Evangelist |
|
||||
|
If default INPUT and OUTPUT policy is drop then you should use following rules for ICMP ping request:
Code:
SERVER_IP="192.168.1.50" CLIENT="192.168.1.10" iptables -A INPUT -p icmp --icmp-type 8 -s $CLIENT -d $SERVER_IP -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT iptables -A OUTPUT -p icmp --icmp-type 0 -s $SERVER_IP -d $CLIENT -m state --state ESTABLISHED,RELATED -j ACCEPT
__________________
Vivek Gite Linux Evangelist |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| USB Port Blocking / Read only Acces on Windows | rajuk | Windows Xp/2000/2003 server administration | 4 | 08-06-2008 11:13 PM |
| blocking streaming | zafar466 | CentOS / RHEL / Fedora | 0 | 12-04-2008 03:37 AM |
| MSN and yahoo messanger blocking through IPTABLES | surmandal | Linux software | 1 | 31-03-2007 12:04 AM |
| iptables rules blocking ftp | hammooda | Linux software | 7 | 23-09-2006 04:24 PM |
| Blocking ports in linux | raj | Linux software | 1 | 10-07-2006 07:31 PM |