<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Firewall on 瓶子裡的小狐狸</title>
    <link>https://szeching.com/tags/firewall/</link>
    <description>Recent content in Firewall on 瓶子裡的小狐狸</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-Hant</language>
    <copyright>© 2026 Y Cheung</copyright>
    <lastBuildDate>Wed, 24 Nov 2021 11:00:00 +0000</lastBuildDate><atom:link href="https://szeching.com/tags/firewall/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>IPTABLES 封鎖 IP 黑名单</title>
      <link>https://szeching.com/blocking-ip-addresses-from-the-ultimate-bad-bot-blockers-bad-ip-address-list-using-iptables/</link>
      <pubDate>Wed, 24 Nov 2021 11:00:00 +0000</pubDate>
      
      <guid>https://szeching.com/blocking-ip-addresses-from-the-ultimate-bad-bot-blockers-bad-ip-address-list-using-iptables/</guid>
      <description>&lt;h2 class=&#34;relative group&#34;&gt;在服務器上增加 iptables chain&#xA;    &lt;div id=&#34;在服務器上增加-iptables-chain&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e5%9c%a8%e6%9c%8d%e5%8b%99%e5%99%a8%e4%b8%8a%e5%a2%9e%e5%8a%a0-iptables-chain&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;div class=&#34;highlight-wrapper&#34;&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;iptables -N black_ip_list&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;iptables -I INPUT -p tcp -m multiport --dports 80,443 -j black_ip_list&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;&#xA;&#xA;&lt;h2 class=&#34;relative group&#34;&gt;新建 bash 文件 banip.sh&#xA;    &lt;div id=&#34;新建-bash-文件-banipsh&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;&#xA;    &#xA;    &lt;span&#xA;        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 -start-6 not-prose group-hover:opacity-100 select-none&#34;&gt;&#xA;        &lt;a class=&#34;text-primary-300 dark:text-neutral-700 !no-underline&#34; href=&#34;#%e6%96%b0%e5%bb%ba-bash-%e6%96%87%e4%bb%b6-banipsh&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;&#xA;    &lt;/span&gt;&#xA;    &#xA;&lt;/h2&gt;&#xA;&lt;p&gt;在這個文件中，首先清空 black_ip_list 中的規則， 然後從 &lt;code&gt;mitchellkrogza/nginx-ultimate-bad-bot-blocker&lt;/code&gt; 中獲取最新的IP BLACKLIST 列表，循環每一個IP地址，將其設為拒絕請求。&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>
