ABHIONLINUX
Site useful for linux administration and web hosting

Showing posts with label open a port using iptables. Show all posts
Showing posts with label open a port using iptables. Show all posts

2009/11/14

How to open ports using iptables

# iptables -I INPUT -p tcp --dport 32 -j ACCEPT

To open a range of ports

iptables -A INPUT -p tcp --destination-port 6881:6999 -j ACCEPT
iptables -A OUTPUT -p tcp --source-port 6881:6999 -j ACCEPT