Home IT Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ CentOS 7.0 Close firewall is enabled by default iptables firewall     - Kafka cluster deployment (Server)

- Debian (Wheezy) Install Java environment / replace OpenJDK as the SUN JDK (Linux)

- How to install Visual Studio Code on Ubuntu (Linux)

- The difference between Linux su and sudo commands (Linux)

- Linux Command Tutorial: du command to view disk space (Linux)

- Linux installation JDK1.6 rpm.bin assembly (Linux)

- Using IE can also be easily remotely control the computer (Linux)

- Setting up Linux machine through a proxy firewall (Linux)

- How to fix the Ubuntu Error script returned error exit status 1 (Linux)

- MongoDB relations, references, index query coverage (Database)

- iptables using summary (Linux)

- Spring next ActiveMQ combat (Programming)

- ogg Oracle to SQL Server 2005 to achieve synchronization (Database)

- CoreOS use register mirror to build private warehouse (Linux)

- Debian 7.7 Installation and Configuration (Linux)

- impdp error ORA-39001, ORA-39000, ORA-31619 (Database)

- Python 3.5 await / async (Programming)

- Mass data storage application of MongoDB database (Database)

- How to install Gnome 3.10 in Ubuntu 13.10 (Linux)

- Android in the coordinate system and a method to obtain the coordinates (Programming)

 
         
  CentOS 7.0 Close firewall is enabled by default iptables firewall
     
  Add Date : 2018-11-21      
         
       
         
  Operating system environment: CentOS Linux release 7.0.1406 (Core) 64 Wei
CentOS 7.0 is the default firewall as a firewall, iptables firewall to step here.

1, closed firewall:
systemctl stop firewalld.service # Stop firewall
systemctl disable firewalld.service # prohibit firewall boot
firewall-cmd --state # view the default firewall status (closed display notrunning, display running after opening)

2, iptables firewall (iptables here has been installed, configured below)
vi / etc / sysconfig / iptables # edit the firewall configuration file
# Sampleconfiguration for iptables service
# You can edit thismanually or use system-config-firewall
# Please do not askus to add additional ports / services to this default configuration
* Filter
: INPUT ACCEPT [0: 0]
: FORWARD ACCEPT [0: 0]
: OUTPUT ACCEPT [0: 0]
-A INPUT -m state - state RELATED, ESTABLISHED -j ACCEPT
-A INPUT -p icmp -jACCEPT
-A INPUT -i lo -jACCEPT
-A INPUT -p tcp -mstate --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -jACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8080-j ACCEPT
-A INPUT -j REJECT - reject-with icmp-host-prohibited
-A FORWARD -jREJECT --reject-with icmp-host-prohibited
COMMIT
:! Wq # Save and exit

Note: As used herein, ports 80 and 8080 for example. *** Add to some of the general - above or below "-A INPUT -p tcp -m state --state NEW -m tcp dport 22 -j ACCEPT" line, remember not to add to the last row, otherwise the firewall does not restart effect.
systemctlrestart iptables.service # final restart firewall configuration to take effect
systemctlenable iptables.service # firewall boot
     
         
       
         
  More:      
 
- Linux System Getting Started Learning: Linux command in w (Linux)
- CentOS 7.0 Experience with previous versions (Linux)
- grep command Series: How to Use the grep command in Linux / UNIX (Linux)
- Netapp storage routine inspections and information gathering (Linux)
- RHEL7 system making use of OpenStack mirror (Linux)
- OpenGL Superb Learning Notes - Fragment Shader (Programming)
- Automatic batch resolve dependencies problem locally installed rpm package (Linux)
- Depth understanding of the use of Spring Redis (Programming)
- PostgreSQL using the system cache to improve operational efficiency (Database)
- Circular list of Java programming (Programming)
- installation and configuration of the PHP environment (Apache2) under Linux (Server)
- Four levels to deal with Linux server attacks (Linux)
- Standard and IO redirection (Linux)
- Extended VMware Ubuntu root partition size (Linux)
- Sort search algorithm Java - application examples with recursive dichotomy (Programming)
- Ubuntu users to install Xtreme Download Manager (Linux)
- DRBD Principle and Features Overview (Server)
- CentOS installation of the ftp (Linux)
- Linux environment Duplex (multi-machine) automatic mutual backup scheme (Linux)
- C ++ 11 feature: auto keyword (Programming)
     
           
     
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.