Press "Enter" to skip to content

How to delete an IP address from a blacklist

Spamhaus.org is one of the most popular Internet security web tools. It helps to remove an IP from black lists and block lists.

How to block and and unblock IP addresses using FirewallD

FirewallD (Firewall Daemon) is a nice alternative to iptables but still uses iptables behind the scenes. Yet it’s much simpler and easier to understand and configure. If you’re running Virtualmin on either Ubuntu or CentOS, your system will be configured to use FirewallD by default. For an alternative that’s even easier, check out ufw .

Here are some common actions that you may perform using FirewallD.

Block an IP Address Using FirewallD

To block an IP address using FirewallD, do the following:

firewall-cmd --add-rich-rule='rule family=ipv4 source address=10.x.x.x reject' --permanent

This will create an entry to permanently ban the IP address. To make it effective, reload the firewalld commands:

firewall-cmd --reload

To check if the rule is there

firewall-cmd --list-all

How to remove a Rich Text Rule

firewall-cmd --remove-rich-rule='rule family=ipv4 source address=10.x.x.x reject' --permanent

How to remove all Rich Text Rules

Edit the file /etc/firewalld/zones/public.xml

How to whitelist an IP address

First determine the zone. Public is often used. If you’re unsure, do firewall-cmd –list-all `

# firewall-cmd --get-zones FirewallD is not running [email protected]:~# service firewalld start [email protected]:~# firewall-cmd --get-zones block dmz drop external home internal public trusted work

Output to make sure it’s public:

# firewall-cmd --list-all public target: default icmp-block-inversion: no interfaces: sources: services: dhcpv6-client dns dns-over-tls ftp http https imap imaps mdns pop3 pop3s smtp smtp-submission smtps ssh ports: 20/tcp 2222/tcp 10000-10100/tcp 20000/tcp 49152-65535/tcp protocols: forward: yes masquerade: no forward-ports: source-ports: icmp-blocks: rich rules: rule family="ipv4" source address="a.b.c.d" reject rule family="ipv4" source address="e.f.g.h" reject

Whitelist the IP address:

[email protected]:~# firewall-cmd --zone=public --add-source=i.j.k.l --permanent success [email protected]:~# firewall-cmd --reload success 

If you firewall-cmd –list-all you will see it in sources:

# firewall-cmd --list-all public (active) . sources: i.j.k.l services: . 

Troubleshooting with Fail2ban

We’ve created this troubleshooting section for folks using FirewallD and Fail2ban. These two tools often work together – Fail2ban scans log files for breach attempts, then sends them off to FirewallD to be blocked.

Excessive “already banned” messages

Periodically review /var/log/fail2ban.log . If you see excessive “already banned” messages in the log file, that means FirewallD hasn’t successfully implemented the rule that was sent via Fail2ban. Our remedy is to restart either fail2ban or firewalld. This is not ideal but at least it will get you about moving on with your day.

service fail2ban restart service firewalld restart

When restarting the services, keep observing the fail2ban.log file using tail to see if the messages are subsiding. One theory is that fail2ban and firewalld has trouble keeping up with log file rotation. In our opinion it’s just firewalld that’s buggy, but in spite of it’s flaws you’ll still need it. We haven’t observed the same issues with UFW.

Removing rich text rule not working when using Fail2ban

In some situation rules might have been dynamically added by Fail2ban, in which case you can’t just remove them with –remove-rich-rule as the system doesn’t consider them permanent. In that case, use the command below:

fail2ban-client set sshd unbanip a.b.c.d

Block and Unblocking SSH on non-default Ports

If you’ve changed your default SSH port to something other than 22, Firewalld and Fail2ban might not be able to properly detect the change. You’ll notice multiple already banned events in the Fail2ban log file. To get this working, you have to tell FirewallD that SSH is on a non-standard port. As of 24 September 2021 we haven’t found a reliable way of doing this, but if you have any tips please leave us a comment below.

For more in-depth information, follow the references.

References

  • https://www.liquidweb.com/kb/an-introduction-to-firewalld/
  • https://www.tecmint.com/install-configure-firewalld-in-centos-ubuntu/
  • https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7
  • http://www.linuxeveryday.com/2016/12/block-unblock-ip-address-firewalld

See Also

Fail2Ban FirewallD related Errors

Below are two examples of errors output after restarting a FirewallD installation whereby FirewallD doesn’t seems to work properly afterwards with the fail2ban Postfix SASL jail. Our remedy was to restart firewalld a few times.

In the first instance, no actual error is returned but the system is indicating that something is wrong:

2022-06-11 11:52:05,635 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- exec: ipset create f2b-postfix-sasl hash:ip timeout 600 firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -p tcp -m multiport --dports smtp,465,submission,imap,imaps,pop3,pop3s -m set --match-set f2b-postfix-sasl src -j REJECT --reject-with icmp-port-unreachable 2022-06-11 11:52:05,636 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- stderr: "Error: COMMAND_FAILED: '/usr/sbin/iptables-restore -w -n' failed: iptables-restore: line 2 failed" 2022-06-11 11:52:05,636 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- stderr: '' 2022-06-11 11:52:05,637 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- returned 13 2022-06-11 11:52:05,637 fail2ban.actions [2822046]: ERROR Failed to execute ban jail 'postfix-sasl' action 'firewallcmd-ipset' info 'ActionInfo( at 0x7f66db2dfc10>, 'raw-ticket': at 0x7f66db2e0310>>)': Error starting action Jail('postfix-sasl')/firewallcmd-ipset: 'Script error'

In the second instance, the error return is related a set that already exists. In this instance there is a good possibility that the jail is not working.

2022-06-11 11:52:06,678 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- exec: ipset create f2b-postfix-sasl hash:ip timeout 600 firewall-cmd --direct --add-rule ipv4 filter INPUT_direct 0 -p tcp -m multiport --dports smtp,465,submission,imap,imaps,pop3,pop3s -m set --match-set f2b-postfix-sasl src -j REJECT --reject-with icmp-port-unreachable 2022-06-11 11:52:06,679 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- stderr: 'ipset v7.5: Set cannot be created: set with the same name already exists' 2022-06-11 11:52:06,679 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- stderr: "Error: COMMAND_FAILED: '/usr/sbin/iptables-restore -w -n' failed: iptables-restore: line 2 failed" 2022-06-11 11:52:06,679 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- stderr: '' 2022-06-11 11:52:06,679 fail2ban.utils [2822046]: ERROR 7f66dbe75170 -- returned 13 2022-06-11 11:52:06,679 fail2ban.actions [2822046]: ERROR Failed to execute ban jail 'postfix-sasl' action 'firewallcmd-ipset' info 'ActionInfo( at 0x7f66db2dfc10>, 'raw-ticket': at 0x7f66db2e0310>>)': Error starting action Jail('postfix-sasl')/firewallcmd-ipset: 'Script error'

How to delete an IP address from a blacklist

Spamhaus.org is one of the most popular Internet security web tools. It helps to remove an IP from black lists and block lists.

How to check whether your IP is blacklisted

To check whether your IP is blocklisted, open Whoer.net in your browser. You’ll see your IP address and a lot of different information. Look at the option “Blacklist”. If the address is blocklisted, you will see “Yes”: Click on “Yes” and Spamhaus.org will show you a reference link with additional information about reasons for blocklisting:

How to remove your IP from blacklist

Click on this link and then click “Remove an IP…”: Check the box “I have read and I have understood this page”: Now you will see a form to remove your address from a blocklist. Enter your IP address, your country, and your domain email. Note that your email should have the same domain as the site to be de-blocklisted. For example, if you want to remove a site johnsmith.com, the email should be like mail@johnsmith.com. Otherwise it just won’t work. After you enter all the data requested (don’t forget about the CAPTCHA in the end) click “Submit.” Wait for all the data to be processed and updated, it may take up to several hours. In case of success, a repeated check will result in the following:

Secure yourself with three simple steps Make your online actions anonymously with leading VPN Get Whoer VPN

Share post:

Information

  • Affiliate Program
  • Blog
  • Recover access code
  • Terms of use
  • Refund Policy
  • Privacy Policy
  • Apps Privacy Policy
  • Contacts

Routerinizdən arzuolunmaz veb saytı necə bloklamaq olar

Xüsusi saytlar üçün gözlərinizi soyuducu saxlamaq lazımdırsa, şəbəkə monitorinq proqramına pul sərf etmək lazım deyil. Şifrələnməmiş veb saytları bloklamaq üçün marşrutlaşdırıcının parametrlərindən istifadə edə bilərsiniz. Blok etməyə çalışdığınız saytlar şifrələnibsə, bloklamaq istədiyiniz saytları filtrləmək üçün OpenDNS kimi pulsuz xidmətdən istifadə edə bilərsiniz.

addım

Metod 1/2: Routerinizin bloklama funksiyasından istifadə

  • Linksys – http://192.168.1.1
  • D-Link / Netgear – http://192.168.0.1
  • Belkin – http://192.168.2.1
  • ASUS – http://192.168.50.1/
  • AT&T U-ayə – http://192.168.1.254
  • Comcast – http://10.0.0.1

Metod 2/2: HTTPS Vebsaytları üçün OpenDNS-dən istifadə

  1. OpenDNS Home proqramının pulsuz versiyası üçün qeydiyyatdan keçin. Şəbəkənizdəki istifadəçilərin müəyyən saytlara daxil olmasını bloklamağınız lazımdırsa, onları marşrutlaşdırıcınızda bloklamaqdansa, OpenDNS ilə daha çox uğur qazanacaqsınız. Bunun səbəbi, əksər ev marşrutlaşdırıcılarının veb saytları bloklamaması və getdikcə daha çox veb-saytın hər gün şifrələmədən istifadə etməsidir. OpenDNS bu şifrələnmiş səhifələri şəbəkənizdəki hər kəs üçün süzgəcdən keçirə bilər.
    • Burada pulsuz qeydiyyatdan keçə bilərsiniz.
  2. Routerinizin konfiqurasiya səhifəsini açın. Siz marşrutlaşdırıcınızı bloklanmış səhifələrinizi emal edən OpenDNS-in DNS serverlərindən istifadə etmək üçün quraşdırdınız. Bunu etmək üçün kompüterinizin veb brauzerində marşrutlaşdırıcının konfiqurasiya səhifəsini açın. Ümumi marşrutlaşdırıcı ünvanlara aşağıdakılar daxildir:
    • Linksys – http://192.168.1.1
    • D-Link / Netgear – http://192.168.0.1
    • Belkin – http://192.168.2.1
    • ASUS – http://192.168.50.1/
    • AT&T U-ayə – http://192.168.1.254
    • Comcast – http://10.0.0.1
  3. Routerinizin administrator hesabı ilə daxil olun. Routerinizin konfiqurasiya səhifəsini ilk dəfə açdığınız zaman sizdən daxil olmaq istəniləcək. Giriş məlumatını dəyişməmisinizsə, istifadəçi adı adətən “admin”, parol isə adətən “admin” və ya boş olur.
  4. “WAN” və ya “İnternet” bölməsini tapın. Bunu marşrutlaşdırıcının “Əsas quraşdırma” bölməsində tapa bilərsiniz.
  5. DNS-i avtomatik söndürün. Bir çox marşrutlaşdırıcılar üçün öz DNS serverlərinizi daxil etməzdən əvvəl avtomatik olaraq DNS-ni söndürməlisiniz.
  6. OpenDNS server ünvanlarını daxil edin. İki DNS server sahəsini görürsünüz. OpenDNS serverlərinə işarə edən aşağıdakı DNS ünvanlarının hər birini daxil edin:
  7. Dəyişiklikləri marşrutlaşdırıcınızda saxlayın. Saxla və ya Tətbiq düyməsini basın və marşrutlaşdırıcınıza yeni DNS parametrləri ilə yenidən başlamasına icazə verin. Bu bir və ya iki dəqiqə çəkə bilər.
  8. OpenDNS idarə panelinə daxil olun. Ziyarət edin və yeni hesabınızla daxil olun. Siz OpenDNS idarə panelinə aparılacaqsınız.
  9. “Parametrlər” sekmesini vurun və ev IP şəbəkənizi daxil edin. Ev IP ünvanınızı idarə paneli səhifəsinin yuxarı hissəsində görə bilərsiniz. Bu ünvanı “Şəbəkə əlavə et” sahəsinə daxil edin. Bu, OpenDNS-ə trafikin şəbəkənizdən nə vaxt gəldiyini bildirməyə və müvafiq olaraq səhifələri bloklamağa imkan verir.
    • OpenDNS üçün qeydiyyatdan keçdiyiniz hesaba göndərilən e-poçt vasitəsilə şəbəkənizi təsdiqləməlisiniz.
  10. Parametrlər sekmesinde “Veb Məzmununun Filtrlənməsi” bölməsini açın. Bu, şəbəkənizdə hansı məzmunun bloklandığını təyin etməyə imkan verir.
  11. Əvvəlcədən təyin edilmiş filtrləmə səviyyələrindən birini seçin (isteğe bağlı). Aşağı, orta və yüksək təhlükəsizlik arasında seçim edə bilərsiniz. Bloklamaq istədiyiniz çoxlu məzmun varsa və OpenDNS bu siyahıları müntəzəm olaraq yeniləyirsə, bu əladır.
  12. Bloklamaq istədiyiniz xüsusi saytları “Fərdi domenləri idarə et” siyahısına əlavə edin. Bu siyahıya 25-ə qədər sayt əlavə edə bilərsiniz. Hər birinin “Həmişə Blok et” olaraq təyin olunduğundan əmin olun.
  13. DNS önbelleğinizi yuyun. Yeni parametrlərinizin qüvvəyə minməsi üçün DNS önbelleğinizi təmizləməlisiniz. Bu, bir müddət sonra şəbəkənizdəki hər bir cihaz üçün avtomatik olaraq baş verir, lakin dərhal bloklamaya ehtiyacınız varsa, bunu əl ilə edə bilərsiniz:
    • Windows – Basın ? Külək + R və yaz ipconfig / flushdns DNS-inizi təmizləmək üçün. İndi filtr parametrlərinizi sınaqdan keçirə bilərsiniz.
    • Mac – Utilities qovluğundan Terminalı açın. Növ dscacheutil – flushcache sonra DNS-i təmizləmək üçün sudo killall -HUP mDNSResponder DNS xidmətini yenidən başlatmaq üçün. Yəqin ki, sizdən administrator parolunuzu daxil etməyiniz xahiş olunacaq.
  14. Parametrlərinizi sınayın. Şəbəkənizdəki cihazlardan yeni əlavə edilmiş saytlara daxil olmağa çalışın. Saytları düzgün əlavə etmisinizsə, OpenDNS Bloklanmış Sayt səhifəsinə keçin.

İcma sualları və cavabları

LAN şəbəkəsinə qoşulmuş kompüterdə WiFi parolunu necə görə bilərəm?

Standart Gateway-i axtarın, ümumiyyətlə marşrutlaşdırıcının IP ünvanıdır. Bu ünvanı veb brauzerdə açın. Sonra marşrutlaşdırıcıda giriş səhifəsinə daxil olun (ümumi identifikator “admin” və parol “parol” və ya “admin”dir və ya standart marşrutlaşdırıcı parolları üçün onlayn axtarın). Şifrəni əldə etməyə imkan verən simsiz parametrləri axtarın. Qeyd: marşrutlaşdırıcının giriş səhifəsi üçün defolt məlumat dəyişdirilərsə və ya o, firewalldan istifadə edərsə, bu işləmir.

Google Hangouts-u blok edə bilərəmmi?

Router Yahoo-nu bloklaya bilərmi?

Routerimdən oyunları necə bloklaya bilərəm?

Bir saytdan başqa hamısını bloklaya bilərəm?

Saytı necə blokdan çıxarmaq olar?

Routerimdən YouTube-u blok edə bilərəmmi?

Comments are closed, but trackbacks and pingbacks are open.