Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Setting CentOS firewall open port     - IIS virtual host of safety knowledge (Linux)

- How to use Linux iptables tool for network sharing (Linux)

- Linux regex awk Comments (Linux)

- How to create a someone project on github (Linux)

- Linux system security settings (Linux)

- Java JDK has been able to compile without warning (Programming)

- How wifi-linux AP signal strength detection (Linux)

- Android imitation UC browser scroll up and down functions (Programming)

- Five kinds of IO Model under Linux (Programming)

- Findbugs installation documentation (Linux)

- Open log in Hibernate (Programming)

- Oracle database physical file backup / restore (Database)

- C ++ based foundation: the difference between C and C ++ (Programming)

- Hadoop connection failed or stuck processing (Server)

- The OpenGL ES GLFW window structures (Programming)

- Java multi-threaded communications pipeline flow (Programming)

- RHEL6.4 one key installation Redmine (Linux)

- Servlet 3.0 interfaces of AsyncListener (Programming)

- Hadoop 2.6.0 standalone configuration and pseudo-distributed configuration under Ubuntu 14.04 (Server)

- Selection sort, insertion sort, and Shell sort (Programming)

 
         
  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
: INPUT ACCEPT [0: 0]
: FORWARD ACCEPT [0: 0]
: OUTPUT ACCEPT [0: 0]
: 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
COMMIT

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.
     
         
         
         
  More:      
 
- Python2 ---- function using dictionaries (Programming)
- Several Ceph performance optimization of new methods and ideas (2015 SH Ceph Day after flu reference) (Server)
- Configuring Eclipse Note Templates (Linux)
- GRUB and Linux system repair (Linux)
- Python, and / or (Programming)
- Linux directory permissions to read and execute permissions difference (Linux)
- SQL Server automatic backup script (Database)
- CentOS6.x and Windows XP and Windows Server 2003 Open IPv6 related matters (Linux)
- Installation GitLab appears ruby_block supervise_redis_sleep action run (Linux)
- Use MySQL optimization of security to prevent misuse of aliases (Database)
- How to force Linux users to change the initial password the first time you log in (Linux)
- Swift notes - let you two hours to learn Swift (Programming)
- Oracle online redefinition (Database)
- Linux linux system security (Linux)
- Shell for loop (Programming)
- Linux (RHEL6 CENTOS6 OLE6) VNC-SERVER Installation and Configuration (Server)
- The security administrator network analysis tools SATAN Introduction under Linux (Linux)
- Why not use the ifconfig command under RedHat Linux 5 (Linux)
- Oracle procedure or function Empty Table (Database)
- Forwarding module with Apache reverse proxy server (Server)
     
           
     
  CopyRight 2002-2020 newfreesoft.com, All Rights Reserved.