In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to configure xtables-addons under the CentOS system to deny IP access". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to configure xtables-addons under the CentOS system to deny IP access".
Sometimes, the IP of some countries has been trying to login or attacking the server, and so on, so you need to analyze the suspicious IP first, and then use iptables to block it. The delay takes time and effort. You can now use xtables-addons to block the source IP.
1. prerequisite
Iptables > = 1.4.5
Kernel-devel > = 3.7
two。 Install dependency packages
The code is as follows:
# yum install gcc gcc-c++ make automake unzip zip xz kernel-devel- `uname-r` iptables-devel perl-Text-CSV_XS
3. Install xtables-addons
The code is as follows:
# wget http://sourceforge.net/projects/xtables-addons/files/Xtables-addons/2.3/xtables-addons-2.3.tar.xz/download
# wget http://sourceforge.net/projects/xtables-addons/files/Xtables-addons/2.3/xtables-addons-2.3.tar.xz/download
# xz-d xtables-addons-2.3.tar.xz
# tar xvf xtables-addons-2.3.tar
# cd xtables-addons-2.3
#. / configure
# make
# make install
4. Geoip related suite
The code is as follows:
# cd geoip
#. / xt_geoip_dl
#. / xt_geoip_build GeoIPCountryWhois.csv
# mkdir-p / usr/share/xt_geoip/
# cp-rp {BE,LE} / usr/share/xt_geoip/
5. Write iptables rules. If you reject the IP in Taiwan
The code is as follows:
# iptables-I INPUT-m geoip-- src-cc TW-j DROP
Thank you for your reading. the above is the content of "how to configure xtables-addons under CentOS system to deny IP access". After the study of this article, I believe you have a deeper understanding of how to configure xtables-addons under CentOS system to deny IP access, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.