1

I've got a server (CentOS 6.7) running, which causes me some headaches.

A few months ago, the website running on the server was unavailable. After some digging, it appeared that Iptables was blocking the server's own outgoing traffic. This happened by a rule automatically added by (I think) fail2ban.

Today, I got a similar problem; now the server was blocking outgoing traffic to two specific IP's, which are, unfortunately, important for the applications running on the server.

I've removed the rules, so now it's all working again, but how do I prevent this from happening again? How do I prevent fail2ban (and maybe friends) from adding rules which block outgoing traffic?

2

You can do whitelisting in fail2ban by adding specific ip or network in the ignoreip list in jail.local file. You will need to add it in [DEFAULT] block.

[DEFAULT]
# "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not                          
# ban a host which matches an address in this list. Several addresses can be                             
# defined using space separator.                                     

ignoreip = 127.0.0.1 192.168.1.0/24 8.8.8.8

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.