Configuration and Basic command interpretation of firewall firewalld in Linux __linux

Source: Internet
Author: User
Tags iptables
Configuration and Basic command explanation of firewall firewalld in Linux
Firewall Introduction:

The firewall in CentOS 7 is a powerful feature that has been upgraded in the Iptables firewall in CentOS 6.5.
I. Installation of FIREWALLD

# yum Install Firewalld Firewall-config

Centos7 default Installation Firewalld
Second, Firewalld service on, off, restart, status View

Start: # systemctl start Firewalld

View Status: # Systemctl status Firewalld or Firewall-cmd–state

Stop: # systemctl Disable FIREWALLD

Disabled: # Systemctl Stop Firewalld

Restart: #systemctl Restart Firewalld

third, open port

Permanently open ports required

sudo firewall-cmd--zone=public--add-port=80/tcp--permanent
sudo firewall-cmd--reload//Overload entry port settings just

Parameter introduction:

1, Firwall-cmd: Linux is provided by the operation of a firewall tool;
2 、--Permanent: The expression is set to persistent;
3 、--Add-port: Identify the added port;

Then check the new rules.

Firewall-cmd--list-all//View firewall rules, you can find the current open port information

firewalld Common commands:
1 2 3 4 5 6 7 8 9 10 11 12-13
Frequently used commands introduce Firewall-cmd--state # #查看防火墙状态, is running Firewall-cmd--reload # #重新载入配置, such as adding a rule, you need to execute this command firewall-cmd-- Get-zones # #列出支持的zone Firewall-cmd--get-services # #列出支持的服务, the service in the list is released Firewall-cmd--query-service FTP # #查看ftp服务是否支持 , return yes or no firewall-cmd--add-service=ftp # #临时开放ftp服务 firewall-cmd--add-service=ftp--permanent # #永久开放ftp服务 Firewall-cmd--remove-service=ftp--permanent # #永久移除ftp服务 firewall-cmd--add-port= 80/tcp--permanent # #永久添加80端口 Iptables-l-N # #查看规则, this command is the same man firewall-cmd as Iptables #查看帮助




















Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.