• Arun Kumar

Manage Linux Firewall with iptables and firewalld

In this article will be covering details regarding iptables and firewalld which helps in Linux firewall management. We will also be looking at how to enable specific ports (1521 for Oracle) inside iptables.

Linux Firewall status

The below command will show you the current status “Active” in case firewall is running

systemctl status firewalld

Disable Linux Firewall

For practicing Oracle on Linux, you might need to disable the Linux firewall so that you can connect applications to database listener. Below commands will permanently disable Linux firewall

service firewalld stop
systemctl disable firewalld

Enable Linux Firewall

Just in case you would like to enable Linux firewall after disabling it, use below commands

service firewalld start
systemctl enable firewalld

Enable 1521 Port in Linux

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.

For Oracle Linux 5 and 6

If you are working on Oracle Linux 5 or 6 version, use below commands to enable specific ports as root user

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

If you would like to open any specific port in Linux, just replace the port number (1521) with new port number.

For Oracle Linux 7

To open a port 1521 permanently, run below command as root user

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

Recent Posts

See All

Important Linux Commands

This article describes important Linux commands that you must know as a system or database administrator. Check CPU Cores in Linux Use one of the below commands to find number of CPUs in Linux includi

Setup Passwordless Connectivity in Linux

Every time you ssh from one Linux server to another, you need to enter target server user's password. We can also setup password less ssh login between two Linux servers so that you don't have to ente

Mount Hard Disk in Linux

In this article we will be looking at adding a new hard disk to a Linux virtual machine and mount it on a directory. This can be achieved by adding a hard disk to virtual box machine under settings an

  • Facebook
  • Twitter
  • YouTube
  • Instagram

© 2020 by DBA Genesis