how to open port at iptable?
How to open port at iptable?
My box is centos 5.4. I wanto to open UDP 177 and TCP 6000~60010. I can connect my box through putty now. Helpful comment would be appreciated. |
http://www.iptables.org/ or http://security.maruhn.com/iptables-tutorial/ should help.
I like to use Firestarter or an rc.firewall script for a frontend to iptables, mostly because I'm used to them. In rc.firewall, you use a PERMIT statement. For example: PERMIT="192.168.1.0/8:137-139/tcp" Syntax: PERMIT="[network or computer ip address]/[netmask]:[port/port range]/[protocol]" This is part of the PERMIT that open my file server to tcp from other computers in my local network. The rc.firewall script is usually heavily annotated, but the Firestarter GUI is friendlier, lots friendlier. |
frankbell/
Thanks a lot! I'm insterested in Firestarter GUI, I'll study it. |
Hi, I assume you are looking for inbound traffic, you can use the below commands
iptables -A INPUT -i <interface> -p udp --dport 177 -j ACCEPT iptables -A INPUT -i <interface> -p udp -m multiport --dports 6000:60010 -j ACCEPT instead of using -i <interface>, you can also use the -s <IP Address> Sandeep |
Quote:
|
All times are GMT -5. The time now is 11:31 AM. |