Enable 1521 Port in Linux Firewall

Jump Ahead

On some servers, port 1521 will not be enabled by default because of security reasons. You can enable this specific port inside linux using below commands.

If you are working on AWS EC2 server, then you need to enable default listener port 1521 in order to accept connections from applications.

iptables -I INPUT -p tcp --dport 1521 -j ACCEPT
iptables -I INPUT -p tcp --dport 80 -j ACCEPT

You can change the port number in above commands to enable specific ports.

For Linux 7

To open a port in the currently running instance use:

firewall-cmd --add-port=1521/tcp

To specify that the port be opened in future restarts of the instance, add the –permanent option

firewall-cmd  --permanent --add-port=1521/tcp 

Was this article helpful?

Related Articles

Leave a Comment