Home PC Games Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Setting CentOS firewall open port     - CentOS 7 version how to achieve the power to start the graphical interface (Linux)

- Red Flag Linux Desktop 6.0 hard disk installation guide (Programming)

- Nginx-1.9.7 TCP reverse proxy (Server)

- Linux operating system security management skills notes (Linux)

- Linux system installation Gitlab (Server)

- Eclipse, Tomcat configuration JNDI connection Oracle data source example (Server)

- Under CentOS Linux automatic backup MySQL database daily (Database)

- Inxi: Get Linux system and hardware information (Linux)

- CentOS 6.5 makes the LAN http source (Linux)

- LVM management reduces swap partition space to the root partition (Linux)

- To create a full command line Android Build System (Linux)

- Puppet centralized configuration management system (Server)

- Five useful commands to manage file types and system time in linux (Linux)

- Oracle row and column switch to turn columns (Database)

- Install Gnome Flashback Classic Desktop on Ubuntu 14.10 / Mint 7 (Linux)

- Create RAID 1 (mirroring) with two disks (Linux)

- Easily create RPM packages using the FPM (Linux)

- Automatic Clear date directory shell script (Linux)

- Terminal Linux command prints - echo (Linux)

- Getting Started with Linux: Learn how to install and access CentOS 7 Remote Desktop on a VPS (Server)

  Setting CentOS firewall open port
  Add Date : 2018-11-21      
  In our system, when using CentOS, CentOS firewall is sometimes necessary to change the settings. CentOS firewall is enabled by default, set the CentOS firewall open port as follows:

Open iptables configuration file:
vi / etc / sysconfig / iptables
When modifying CentOS firewall Note: Be sure to give yourself a good way out, leaving a VNC port management and port management SSh

Here is an example of an iptables:

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
* Filter
: RH-Firewall-1-INPUT - [0: 0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp -icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state ESTABLISHED, RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m udp -p udp -dport 53 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 25 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 443 -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT -reject-with icmp-host-prohibited

Modify CentOS firewall should be noted that, according to their own server you have to modify this file.

For example, if you do not want to open port 80 to provide web services, it should be appropriate to delete this line:
-A RH-Firewall-1-INPUT -m state -state NEW -m tcp -p tcp -dport 80 -j ACCEPT

All iptables restart after modifying:
service iptables restart

You can verify whether the rules are already in force: iptables -L

Thus, we have completed the modified settings CentOS firewall.
- systemd-nspawn Quick Guide (Linux)
- How to recover deleted files in Linux systems (Linux)
- Hibernate Search 5.5 in the search results sorted (Linux)
- JBoss7 configuration - Supports IPv4 and IPv6 dual-stack environment (Server)
- Network traffic monitoring ntopng (Linux)
- Installation Experience open source car Automotive Grade Linux system (Linux)
- Change the kernel boot sequence after CentOS 7 kernel upgrade (Linux)
- Oracle 10g, 11g database silent installation of small differences (Database)
- ActiveMQ5.10.2 version configuration JMX (Linux)
- Linux password file security issues detailed usage (Linux)
- Oracle SQL statement to retrieve data paging table (Database)
- Linux installation is larger than 2TB (UEFI interface) hard disk solution (Linux)
- How to install Go1.5 source development environment on Mac (Server)
- Java objects are taking up much space (Programming)
- Install Visual Studio Code in Ubuntu (Linux)
- AppCode developed Mac OS X application or shared library experience summary (Programming)
- Linux command line to put on your coat GUI (Linux)
- To read the Linux ext3 / ext4 format partitions under Windows system software (Linux)
- CentOS / Linux install VNC Server (Linux)
- Zabbix monitoring tool deployment under Ubuntu server (Server)
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.