How to open ports blocked by firewall in Linux?

To open up a port which is blocked by firewall do the following.

Open the iptables file

$ vi /etc/sysconfig/iptables

Add the following line before the last line(REJECT) in the above file

-A RH-Firewall-1-INPUT -p udp -m tcp --dport 9080 -j ACCEPT

Restart iptables

$ restart iptables.

In this way, the port 9080 can be accessed which has been blocked by firewall in Linux machines.

Search