Linux cent OS Command firewall-ports

Source: Internet
Author: User

1) Start the slogan:
 -Jaccept# -J accept#3306 -j ACCEPT
2) Then Save:
#/etc/rc.d/init.d/iptables Save
3) To view open ports:
#/etc/init.d/iptables Status

-------------------------------------------------------Additional instructions: Turn off the firewall
#/etc/init.d/iptables stop
#service iptables Stop #停止服务
#service iptables Start #开启服务
View firewall Information
#/etc/init.d/iptables status
Open ports: 8080
8080 -j ACCEPT
 ----------------------The operation of Cent OS 7------------------
# firewall-cmd--permanent--zone=public--add-port=8080-8081/tcp #开发端口 8080 to 8081# firewall -cmd--Reload #重新载入 # firewall-cmd--zone=public--list-Ports# firewall-cmd--permanent--zone= Public--list-ports# firewall-cmd--permanent--zone=public--remove-port=8080-8081/ Tcp

Linux cent OS command firewall-ports

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.