Correct a problem with the firewall configuration


This tutorial will show you how you can fix a problem with the firewall configuration of your server.
At first you have to mount your partitions.

The editors “vi” and “nano” are available in the rescue system. You can either modify the configuration files on your hard disk or disable the start of the firewall.

On Debian/Ubuntu

The most common configuration is the use of the packet iptables-persistent.
You can edit the configuration file that you can find here:


The “X” has to be replaced by “4” (IPv4) or “6” (IPv6) depending on the rule that is blocking you.

On CentOS

At first you'll have to chroot yourself on your partition:

sudo chroot /mnt/sda2

Then execute the following code:

chkconfig iptables off

Note: This command is initially intended for CentOS 6, but it is also compatible with CentOS 7

Once you have finished the modification, click on “Boot in normal mode” in your account to restart your server.