{"id":251,"date":"2025-11-15T19:53:12","date_gmt":"2025-11-15T19:53:12","guid":{"rendered":"https:\/\/adveyer.com\/blog\/?p=251"},"modified":"2025-11-15T19:53:12","modified_gmt":"2025-11-15T19:53:12","slug":"linux-ip-ban-kaldirma","status":"publish","type":"post","link":"https:\/\/adveyer.com\/blog\/linux-ip-ban-kaldirma\/","title":{"rendered":"Linux IP Ban Kald\u0131rma"},"content":{"rendered":"<p>Linux sunucularda zaman zaman belirli bir IP adresinin engellenmesi (banlanmas\u0131) normaldir. Bu genellikle:<\/p>\n<ul>\n<li>SSH hatal\u0131 giri\u015f denemeleri<\/li>\n<li>Spam e-posta tespiti<\/li>\n<li>Web sald\u0131r\u0131 giri\u015fimleri<\/li>\n<li>Firewall g\u00fcvenlik kurallar\u0131<\/li>\n<li>Fail2ban taraf\u0131ndan otomatik ban<\/li>\n<li>CSF (ConfigServer Firewall) IP bloklamas\u0131<\/li>\n<\/ul>\n<p>gibi durumlarda meydana gelir.<\/p>\n<p>Ancak bazen <strong>yanl\u0131\u015fl\u0131kla kendi IP adresimizi<\/strong> veya m\u00fc\u015fterimizin IP\u2019sini de engelleyebiliriz.<br \/>\nBu gibi durumlarda h\u0131zl\u0131 \u015fekilde ban kald\u0131rmak gerekir.<\/p>\n<p>Bu rehberde Linux \u00fczerinde engellenen IP adresini <strong>Fail2ban, CSF, iptables ve firewalld<\/strong> \u00fczerinden nas\u0131l kald\u0131raca\u011f\u0131n\u0131z\u0131 ad\u0131m ad\u0131m \u00f6\u011freneceksiniz.<\/p>\n<h1><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-252 aligncenter\" src=\"https:\/\/adveyer.com\/blog\/wp-content\/uploads\/2025\/11\/fail2ban-ip-ban-kaldirma-1024x576-1-300x169.webp\" alt=\"Linux IP Ban Kald\u0131rma\" width=\"462\" height=\"260\" srcset=\"https:\/\/adveyer.com\/blog\/wp-content\/uploads\/2025\/11\/fail2ban-ip-ban-kaldirma-1024x576-1-300x169.webp 300w, https:\/\/adveyer.com\/blog\/wp-content\/uploads\/2025\/11\/fail2ban-ip-ban-kaldirma-1024x576-1-768x432.webp 768w, https:\/\/adveyer.com\/blog\/wp-content\/uploads\/2025\/11\/fail2ban-ip-ban-kaldirma-1024x576-1.webp 1024w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/h1>\n<h1><strong>Fail2ban \u00dczerinden IP Ban Kald\u0131rma<\/strong><\/h1>\n<p>Fail2ban, SSH, FTP, Apache gibi servisleri koruyan en pop\u00fcler otomatik g\u00fcvenlik arac\u0131d\u0131r.<br \/>\nYanl\u0131\u015f \u015fifre girilince IP\u2019yi otomatik bloke eder.<\/p>\n<h3>\u2714 Banl\u0131 IP\u2019yi kontrol etmek i\u00e7in:<\/h3>\n<pre><code class=\"language-bash\">fail2ban-client banned\r\n<\/code><\/pre>\n<h3>\u2714 T\u00fcm jail\u2019lerde IP\u2019yi aramak i\u00e7in:<\/h3>\n<pre><code class=\"language-bash\">fail2ban-client status | grep -i ssh\r\n<\/code><\/pre>\n<p>\u00d6rnek:<\/p>\n<pre><code class=\"language-bash\">fail2ban-client status sshd\r\n<\/code><\/pre>\n<h3>\u2714 IP ban\u0131n\u0131 kald\u0131rmak:<\/h3>\n<pre><code class=\"language-bash\">sudo fail2ban-client unban &lt;IP-ADRESI&gt;\r\n<\/code><\/pre>\n<p>\u00d6rne\u011fin:<\/p>\n<pre><code class=\"language-bash\">sudo fail2ban-client unban 85.100.22.14\r\n<\/code><\/pre>\n<h3>\u2714 SSH jail&#8217;inden kald\u0131rmak:<\/h3>\n<pre><code class=\"language-bash\">sudo fail2ban-client set sshd unbanip 85.100.22.14\r\n<\/code><\/pre>\n<p>Fail2ban kullan\u0131yorsan\u0131z <strong>IP ban\u0131 kald\u0131rmak i\u00e7in en do\u011fru y\u00f6ntem budur.<\/strong><\/p>\n<h1><strong>CSF (ConfigServer Firewall) IP Ban Kald\u0131rma (cPanel\/WHM Sunucular\u0131)<\/strong><\/h1>\n<p>CSF, \u00f6zellikle <a href=\"https:\/\/www.cpanel.net\/\" target=\"_blank\" rel=\"noopener\">cPanel\/WHM<\/a> sunucular\u0131n\u0131n g\u00fcvenli\u011fini sa\u011flayan ve otomatik IP bloklayan bir firewall\u2019dur.<\/p>\n<h3>\u2714 IP engellenmi\u015f mi kontrol et:<\/h3>\n<pre><code class=\"language-bash\">csf -g 85.100.22.14\r\n<\/code><\/pre>\n<h3>\u2714 Temp ban kald\u0131rma:<\/h3>\n<pre><code class=\"language-bash\">csf -tr 85.100.22.14\r\n<\/code><\/pre>\n<h3>\u2714 Permanent ban kald\u0131rma:<\/h3>\n<pre><code class=\"language-bash\">csf -dr 85.100.22.14\r\n<\/code><\/pre>\n<h3>\u2714 IP&#8217;yi whitelist\u2019e ekleme:<\/h3>\n<pre><code class=\"language-bash\">csf -a 85.100.22.14\r\n<\/code><\/pre>\n<p>CSF kullan\u0131yorsan\u0131z IP kald\u0131rma i\u015flemlerini <strong>CSF komutlar\u0131yla<\/strong> yapman\u0131z gerekir.<\/p>\n<h1><strong>iptables \u00dczerinden IP Ban\u0131 Kald\u0131rma<\/strong><\/h1>\n<p>Eski ama h\u00e2len bir\u00e7ok sunucuda kullan\u0131lan firewall iptables\u2019t\u0131r.<\/p>\n<h3>\u2714 T\u00fcm bloklu IP\u2019leri listelemek i\u00e7in:<\/h3>\n<pre><code class=\"language-bash\">sudo iptables -L -n --line-numbers\r\n<\/code><\/pre>\n<h3>\u2714 Belirli bir IP\u2019nin engelini kald\u0131rmak:<\/h3>\n<p>Ad\u0131m 1: Engeli bul:<\/p>\n<pre><code class=\"language-bash\">iptables -L INPUT -n --line-numbers\r\n<\/code><\/pre>\n<p>\u00d6rnek \u00e7\u0131kt\u0131:<\/p>\n<pre><code>5  DROP  all  --  85.100.22.14  0.0.0.0\/0\r\n<\/code><\/pre>\n<p>Ad\u0131m 2: 5 numaral\u0131 kural\u0131 sil:<\/p>\n<pre><code class=\"language-bash\">iptables -D INPUT 5\r\n<\/code><\/pre>\n<h3>\u2714 iptables-save ile kaydet<\/h3>\n<pre><code class=\"language-bash\">service iptables save\r\n<\/code><\/pre>\n<h1><strong>firewalld \u00dczerinden IP Ban Kald\u0131rma (CentOS, AlmaLinux, Rocky)<\/strong><\/h1>\n<p>firewalld yeni nesil firewall y\u00f6netim sistemidir.<\/p>\n<h3>\u2714 Bloklu IP\u2019leri kontrol et:<\/h3>\n<pre><code class=\"language-bash\">firewall-cmd --list-rich-rules\r\n<\/code><\/pre>\n<h3>\u2714 IP engelini kald\u0131rma:<\/h3>\n<pre><code class=\"language-bash\">firewall-cmd --permanent --remove-rich-rule='rule family=\"ipv4\" source address=\"85.100.22.14\" reject'\r\n<\/code><\/pre>\n<p>Daha sonra servisi yeniden y\u00fckleyin:<\/p>\n<pre><code class=\"language-bash\">firewall-cmd --reload\r\n<\/code><\/pre>\n<h1><strong>hosts.deny \u0130\u00e7inden IP Ban Kald\u0131rma<\/strong><\/h1>\n<p>Baz\u0131 eski sistemlerde IP engellemeleri <code>\/etc\/hosts.deny<\/code> dosyas\u0131nda olabilir.<\/p>\n<h3>\u2714 Dosyay\u0131 a\u00e7:<\/h3>\n<pre><code class=\"language-bash\">nano \/etc\/hosts.deny\r\n<\/code><\/pre>\n<h3>\u2714 IP sat\u0131r\u0131n\u0131 sil<\/h3>\n<p>Kaydedip \u00e7\u0131k:<\/p>\n<p>Ctrl + X \u2192 Y \u2192 Enter<\/p>\n<h1><strong>DDoS \/ ModSecurity \/ WAF Taraf\u0131ndan Engellemeler<\/strong><\/h1>\n<p>Cloudflare, ModSecurity, Imunify360 gibi g\u00fcvenlik duvarlar\u0131 IP\u2019leri otomatik engelleyebilir.<\/p>\n<h3>Cloudflare:<\/h3>\n<p>Firewall \u2192 Events \u2192 Allow IP \u2192 85.100.22.14<\/p>\n<h3>ModSecurity:<\/h3>\n<p>WHM \u2192 ModSecurity Tools \u2192 Hits \u2192 IP se\u00e7 \u2192 Allow<\/p>\n<h3>Imunify360:<\/h3>\n<p>WHM \u2192 Imunify360 \u2192 Firewall \u2192 Unblock<\/p>\n<h1><strong>IP Neden Banlan\u0131yor?<\/strong><\/h1>\n<p>En yayg\u0131n nedenler:<\/p>\n<ul>\n<li>SSH brute force denemeleri<\/li>\n<li>WordPress paneline hatal\u0131 giri\u015f<\/li>\n<li>E-posta SMTP hatalar\u0131<\/li>\n<li>Port taramas\u0131<\/li>\n<li>Dosya y\u00f6neticisi sald\u0131r\u0131lar\u0131<\/li>\n<li>cPanel\u2019e \u00e7ok kez hatal\u0131 login<\/li>\n<li>Firewall e\u015fik de\u011ferlerini a\u015fma<\/li>\n<\/ul>\n<p>Ban kald\u0131rd\u0131ktan sonra mutlaka <strong>neden banland\u0131\u011f\u0131n\u0131 loglardan kontrol edin.<\/strong><\/p>\n<p>\u00d6rne\u011fin SSH ban sebebini g\u00f6rmek i\u00e7in:<\/p>\n<pre><code class=\"language-bash\">journalctl -u ssh\r\n<\/code><\/pre>\n<h2><strong>Linux IP Ban Kald\u0131rma &#8211; Sonu\u00e7<\/strong><\/h2>\n<p>Linux\u2019ta IP ban kald\u0131rma i\u015flemi, kullan\u0131lan g\u00fcvenlik sistemine g\u00f6re farkl\u0131 \u015fekillerde yap\u0131l\u0131r.<br \/>\nFail2ban, CSF, iptables, firewalld ve di\u011fer WAF sistemleri IP engellerini kendi y\u00f6ntemleriyle y\u00f6netir.<\/p>\n<p>Bu rehber sayesinde:<\/p>\n<p>\u2714 Hangi sistemin IP\u2019yi banlad\u0131\u011f\u0131n\u0131 bulabilir<br \/>\n\u2714 Do\u011fru komutlarla engeli kald\u0131rabilir<br \/>\n\u2714 Gerekirse IP\u2019yi whitelist\u2019e ekleyebilirsiniz<\/p>\n<p>Art\u0131k sunucunuza eri\u015fim engellendi\u011finde pani\u011fe gerek yok!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux sunucularda zaman zaman belirli bir IP adresinin engellenmesi (banlanmas\u0131) normaldir. Bu genellikle: SSH hatal\u0131 giri\u015f denemeleri Spam e-posta tespiti Web sald\u0131r\u0131 giri\u015fimleri Firewall g\u00fcvenlik kurallar\u0131 Fail2ban taraf\u0131ndan otomatik ban CSF (ConfigServer Firewall) IP bloklamas\u0131 gibi durumlarda meydana gelir. Ancak bazen yanl\u0131\u015fl\u0131kla kendi IP adresimizi veya m\u00fc\u015fterimizin IP\u2019sini de engelleyebiliriz. Bu gibi durumlarda h\u0131zl\u0131 \u015fekilde [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[],"class_list":["post-251","post","type-post","status-publish","format-standard","hentry","category-linux-genel"],"_links":{"self":[{"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/posts\/251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/comments?post=251"}],"version-history":[{"count":2,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/posts\/251\/revisions"}],"predecessor-version":[{"id":254,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/posts\/251\/revisions\/254"}],"wp:attachment":[{"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/media?parent=251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/categories?post=251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adveyer.com\/blog\/wp-json\/wp\/v2\/tags?post=251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}