Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
Network Troublshooting => Linux Servers Support => Topic started by: sothy on May 02, 2006, 02:21:31 AM
-
Dear all
Now day i have working fine with squid on SUSE 9.1 but i want to know some knowleage about how to block client port all and then if we want to open port client we can permit port that we want ......how ever i hope you will know about my question........
Regard
Sothy
-
well. I have no experience about SuSe but in iptables you can do it easily.
first give all the ports you want to allow .. like
iptables -A INPUT -p udp -i eth0 --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -i eth0 --dport 80 -j ACCEPT
here we are allow udp port 22 and tcp port 80 connection on eth0 .
And in the end add following line
iptables -P INPUT DROP
So it will drop everything else other than allowed one.
-
Just try Ricky's suggestion, but i think its different in SUSE
Gaurav
-
Dear Sir
About the information that i recived from Ricky have some scripts that i can use not at all . How ever i better than befor that have alot ip that want to try coneect to my server ,But Mr.Gauravbajaj if you have good idea about how to block and allow ip that we want could you pleased help and tell me about the script or your experiened that you meet or done .....
Thank You For Your Help.
Regard
Sothy
-
Actually I worked on SUSE previously, when i have 2-3 serveers of SUSE but as now i dont have any Server in REDHAT or SUSE...So i can't test the things u asked previously.
Ya I can test if u give ipaddress and the password of ur SUSE machine ....
Otherwise its difficult to me as I dont have any Linux machine now.
Gaurav
-
Try this, u have plenty of script samples, up to u to pick which one u love:
linuxguruz.com/iptables/