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 ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
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 | ||
|
|
|
||||
|
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 |
![]() |
| Bookmarks |
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 | 06-09-2008 12:13 AM |
| blocking streaming | zafar466 | CentOS / RHEL / Fedora | 0 | 04-12-2008 04:37 AM |
| MSN and yahoo messanger blocking through IPTABLES | surmandal | Linux software | 1 | 03-31-2007 01:04 AM |
| iptables rules blocking ftp | hammooda | Linux software | 7 | 09-23-2006 05:24 PM |
| Blocking ports in linux | raj | Linux software | 1 | 07-10-2006 08:31 PM |