Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ CentOS 7.0 Close firewall is enabled by default iptables firewall     - MySQL Server Time Synchronization Problem (Database)

- Oracle delete table space prompted ORA-00604 and ORA-38301 (Database)

- Android Sets the system screen brightness (Programming)

- Tsunami-udp accelerated network transmission (Linux)

- CentOS achieve trash mechanism (Linux)

- Upgrading to Debian 7.6 glibc 2.15 (Linux)

- GDB remote connections RX Probe online debug program (Programming)

- Oracle through the alarm log view and inspect the main library, physical and snapshot standby database (Database)

- VPS xen openvz kvm (Server)

- PLSQL often lose resolution process automatically disconnect the connection (Database)

- Linux server remote user to obtain root privileges prevention (Linux)

- PostgreSQL with the C Completing the storage process instances (Database)

- VMware Workstation virtual machine startup error: Could not open / dev / vmmon in CentOS 6 (Linux)

- Oracle 11g RAC automatically play GI PSU patch ( (Database)

- After restarting network services, DNS address failure (Linux)

- MySQL server after an unexpected power outage can not start (Database)

- Ubuntu 12.04 commonly use shortcuts finishing Share (Linux)

- A new method for Linux hidden files (Linux)

- Linux supports serial output method (Linux)

- How to upgrade to Ubuntu 14.04 Ubuntu 14.10 (Linux)

  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
-A INPUT -p icmp -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
:! 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
- Lambda expressions of evolution (Programming)
- Linux Security Module (LSM) Introduction (Linux)
- Linux (CentOS) SSH login without password authentication (Linux)
- The most simple drive to write and test procedures under linux (Programming)
- Questions about Linux compiler u-boot (Programming)
- Docker - for the development and deployment of unified lightweight Linux containers (Linux)
- Linux System Getting Started Tutorial: mounted directly in Linux LVM partition (Linux)
- MongoDB learning Notes (2) basic connection example of -Nodejs and MongoDB (Database)
- MariaDB database storage path modify configuration issues (Database)
- Ubuntu Froxlor Server Administration panel installation (Server)
- Confrontation dragged Library - Web front-end encryption slow (Linux)
- Xshell configure SSH free password (Server)
- The method of installing software under Ubuntu Linux (Linux)
- To install Docker under Ubuntu 15.04 (Linux)
- Use this one-time password via SSH secure login Linux (Programming)
- QBit development of micro-services (Server)
- Large computer network security policy Experience (Linux)
- Linux reserves the rest of the file to delete several (Linux)
- Linux performance monitoring and common commands Introduction (Linux)
- Linux basic introductory tutorial ---- regex basis (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.