In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-09-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
iptables rule learning
Example 1: A is centos 5.5
web server IP:192.168.36.9
B for clients:Windows 7 browsers: Firefox, Google, IE
IP:192.168.36.125
Requirement: A prohibits B from visiting
Terminals connect to centos 5.5 Add firewall rules:
Method 1:
iptables -I INPUT -s 192.168.36.125 -p tcp -d 192.168.36.9 --dport 80 -j DROP
Method 2:
iptables -I INPUT -p tcp --dport 80 -s 192.168.36.125 -j REJECT
or
iptables -I INPUT -p tcp --dport 80 -s 192.168.36.125 -j REJECT
2: Prohibiting a client port from accessing a Server port:
iptables -I INPUT -s 192.168.36.125 -p tcp -sport 1021 -d 192.168.36.9 --dport 21 -j REGECT
Note: Port 1021 of 192.168.36.125 is prohibited from accessing port 21 of 192.168.36.9. TCP/IP communication is established.
Note: You can also seal an IP segment: for example: 192.168.36.0/24 but cannot write 192.168.36.0/255.255.255.0, it will report an error.
iptables -I Add rule takes effect immediately
iptables -A Add rules, take effect without iptables -I Quick
iptables -F Clear all firewall rules-Temporarily clear current rules "/etc/init.d/iptables save" will clear rules permanently
iptables -D Manually clear a rule
iptables -Z Clear packet and counter
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.