Linux operating system firewall configuration modification instruction set

  

Modifying the firewall configuration requires modifying the /etc/sysconfig/iptables file. If you want to open which port, add one to it.

-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT

That's it, 1521 is to be open The port number and then restart the linux firewall service.

Command to stop/start the firewall service:

After logging in as root, execute

service iptables stop --stop

service iptables start --start

(service command is located in /sbin)

Firewall rules can only be activated when the iptables service is running. To start the service manually, use the following command:

/sbin rvice iptables restart

To ensure that it boots when the system boots, use the following command:

/sbin/chkconfig - -level 345 iptables on

The ipchains service cannot be run concurrently with the iptables service. To make sure the ipchains service is disabled, execute the following command:

/sbin/chkconfig --level 345 ipchains off



Copyright © Windows knowledge All Rights Reserved