1

Topic: How do I remove iptables rules from boot in a CentOS 7.x server?

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9 MARIADB edition.
- Deployed with iRedMail Easy or the downloadable installer? (downloadable installer)
- Linux/BSD distribution name and version: CentOS 7.x
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): NGINX
- Manage mail accounts with iRedAdmin-Pro? Not yet, but planned, I own iRedAdmin-Pro
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I need to know how to disable the iptables configuration, I've disable firewalld and created an empty /etc/sysconfig/iptables file, but each time I restart the server the IPtables configuration is restored.

I do not need the IPtables configuration as I use a physical firewall, so I need to remove firewalld and iptables from my server.

Thanks.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How do I remove iptables rules from boot in a CentOS 7.x server?

Hi,

I just realised that the rules are being created upon restart by the failtoban service.

Ok, ignore my question please.

3

Re: How do I remove iptables rules from boot in a CentOS 7.x server?

MrPerson wrote:

Hi,

I just realised that the rules are being created upon restart by the failtoban service.

Ok, ignore my question please.


You can do what you like, but if this were me I would not disable fail2ban unless you utilize an IPS/IDS within your firewall.  If you need to whitelist IP's behind your firewall that's one thing, but disabling it entirely could cause many more problems.  The fail2ban rules are there to address application level abusive behavior on a per IP address basis.

4

Re: How do I remove iptables rules from boot in a CentOS 7.x server?

Hi stahr,

Thanks for your advise.

I don't plan to remove fail2ban, I was troubleshooting another problem and wanted to get rid of IPTables entirely to rule the issue out, this server is not in production yet.

This is the first time I use iRedMail, I had disabled the Firewalld service and as the problem persisted cleared iptables, rebooted and noticed more iptables, I got confused thinking it was something else when I realised that what I was seeing were the failtoban chains. Just some little confusion that is all.

Regards.

5

Re: How do I remove iptables rules from boot in a CentOS 7.x server?

You may want to disable both firewalld and fail2ban services temporarily.

6

Re: How do I remove iptables rules from boot in a CentOS 7.x server?

iptables are not cleared on centos when disabling firewalld.

You have to remove firewalld alltogether to clear them.