HostwareSupport-Linux Hosting technical support for cPanel, Plesk, Directadmin servers

Linux Hosting technical support for cPanel, Plesk, Directadmin and No control panel servers offers and listing
http://hostwaresupport.com/

Nov 17, 2009

Open port using Iptables

Hello Friends,

Following are the commands to open tcp or udp ports on the server.

Before using commands for opening the port please make sure the specific port is already opend and what is the use of that port.

you can verify the port with

netstat -nap | grep :



Say here we have to open port 25
 

1.you can open TCp port with

iptables -A INPUT  -p tcp  –dport  25  -j ACCEPT

2. You can open UDP port with

iptables -A INPUT -p udp –sport 
25  -j ACCEPT

 after that

3 service iptables save

and for flushhing iptables us

iptables -F 



iptables -A INPUT -s 210.0.143.122 -j DROP

203.162.3.147

iptables -L

service iptables save

No comments:

Post a Comment