Go Back   The UNIX and Linux Forums > Operating Systems > Linux
google site



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Search this Thread
  #1  
Old 4 Weeks Ago
Registered User
 

Join Date: Jan 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
iptables rule problem

Hi,
i have 40 client's in my network, that connected to internet via
squid server (WebProxy). i want none of these client can't ping my squid server bat squid server can ping them.i wrote these rules but it is'nt work.


Code:
iptables -P INPUT DROP
iptables -P OUTPUT DROP
iptables -A INPUT -p icmp -s 192.168.23.1/24 -d 0/0 -j ACCEPT
iptables -A OUTPUT -p icmp -s 192.168.23.1/24 -d /0/0 -j ACCEPT

squid server ip address is 192.168.23.1

please help.
thanks.
Sponsored Links
  #2  
Old 1 Week Ago
Registered User
 

Join Date: Aug 2010
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
first of all you need to see all your iptable list


Code:
iptable -L

and make sure there is no iptables rule , that will accept all connection
then

try this ->

let say your client ip range = 192.168.1.0/24
so


Code:
iptables -A INPUT -s 192.168.1.0/24 -p icmp -j ACCEPT


Last edited by ultramen7; 1 Week Ago at 11:55 PM..
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Rule # 8 bluegospel Post Here to Contact Site Administrators and Moderators 1 01-12-2010 01:59 AM
Problem with including foreign characters in Lex rule Nathalie1 Programming 1 01-31-2008 10:45 AM
iptables rule to block ping to internet progressdll UNIX for Advanced & Expert Users 1 11-22-2007 10:32 AM
same old, same old - and iptables problem sam_pointer IP Networking 2 11-29-2002 06:53 AM



All times are GMT -4. The time now is 09:22 PM.