如何禁止360爬蟲訪問?centos 7系統

2021-10-11 07:44:37 字數 3210 閱讀 7802

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="180.153.232.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="180.153.234.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="180.153.236.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="180.163.220.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.101.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.102.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.103.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.10.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.12.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.13.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.14.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.15.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.16.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.17.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.46.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.48.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.49.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.50.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.51.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.52.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.53.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.54.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.55.0/24" drop"

sudo firewall-cmd --permanent --zone=public --remove-rich-rule="rule family="ipv4" source address="42.236.99.0/24" drop"

然後記得firewall-cmd --reload

才會生效。

以上是在360站長官網找到的360爬蟲的ip段,全部都禁止連線  避免爬蟲把伺服器搞掛了。

畢竟360能給你帶來的流量實在是太有限了。

爬蟲如何避免被禁止

一 禁止cookie 有的 會通過cookie來識別使用者,我們可以禁用cookie使對方 無法識別出我們的對話資訊,達到避免被禁止。在scrapy的專案中的settings.py 檔案中找到 並修改如下 disable cookies enabled by default cookies enab...

爬蟲禁止訪問解決方法(403)

連線手機熱點,或者換wifi.偽裝瀏覽器請求增加header 收集到的常用header my headers mozilla 5.0 windows nt 6.1 wow64 rv 30.0 gecko 20100101 firefox 30.0 mozilla 5.0 compatible msi...

LANMP 如何禁止訪問 htaccess 檔案

其實這個很簡單,因為 htaccess 在 lanmp 環境下,當他作為檔案被訪問的時候是由 nginx 作為靜態檔案來處理的,所以我們需要在 nginx 裡來新增規則。而且這個規則,在 nginx 預設的裡面是存在的,如下 deny access to htaccess files,if apac...