In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
2025-11-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
1. Disable selinux
/sbin/setenforce 0sed -i 's\SELINUX=enforcing\SELINUX=disabled\' /etc/selinux/config
2. Disable firewall
systemctl stop firewalld.service systemctl disable firewalld.service
3. Enable firewall
systemctl start firewalld.servicesystemctl enable firewalld.service
4. Firewall command
#rename computer name hostnamectl set-hostname centos7_node200#view firewall status firewall-cmd --state #update firewall rules firewall-cmd --reload #View firewall status firewall-cmd --state #overload firewall rules firewall-cmd --reload #View all open ports firewall-cmd --list-ports #View all allowed services firewall-cmd --list-services #Get all supported services firewall-cmd --get-services #View all zones firewall-cmd --list-all-zones #View active zones firewall-cmd --get-active-zones #Set public to default zone firewall-cmd --set-default-zone=public #View default zone info firewall-cmd --get-default-zone #Add interface eth0 to zone publicfirewall-cmd --zone=public --add-interface=eth0 #Remove interface eth0 firewall-cmd --zone=public --remove-interface=eth0 from zone public #Modify the zone to which eth0 belongs to default firewall-cmd --zone=default --change-interface=eth0 #View the zone to which eth0 belongs firewall-cmd --get-zone-of-interface=eth0
5. Configure firewall rules
--permanent means permanent
#permanently add port 22 exception (zone public)firewall-cmd --permanent --zone=public --add-port=22/tcp #permanently remove port 22 exception (zone public)firewall-cmd --permanent --zone=public --remove-port=22/tcp #Block access to ssh services on segment 192.168.10.0/24 firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address="192.168.10.0/24" service name="ssh" reject" #firewall-cmd --permanent --zone=public --add-rich-rule="rule family="ipv4" source address=" 192.168.0.4/24 " port protocol="tcp" port="8080" accept
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.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about
The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r
A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.