In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-09 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you how to use firewall in Linux. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.
Summary of the usage of firewall in Linux
Firewall is easy to use
1, showing all configurations
Firewall-cmd-list-all-zones
2, reload the configuration
Firewall-cmd-reload
3, remove interface from public
Firewall-cmd-zone=public-remove-interface=eno16777736
4. Query public network port
Firewall-cmd-permanent-query-port=8080/tcp
5. Delete port 8080 and prohibit access to public network
Firewall-cmd-permanent-remove-port=8080/tcp
6. Add port 8080 for access to the public network
Firewall-cmd-permanent-add-port=8080/tcp
7, restart the firewall
Systemctl restart firewalld
8, forward the request to port 80 to 8080
Firewall-cmd-add-forward-port=port=80:proto=tcp:toport=8080
9, take a look at which services and ports are now opened by the firewall
[root@localhost ~] # firewall-cmd-- list-allpublic (default, active) interfaces: eno16777736 sources: services: dhcpv6-client ssh ports: 8080/tcp masquerade: no forward-ports: port=80:proto=tcp:toport=8080:toaddr= icmp-blocks: rich rules:
10, set the default zone
Irewall-cmd-- get-default-zonefirewall-cmd-- set-default-zone=trusted the above is how firewall is used in Linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.