Configure the firewall on the command line (iptables)

You can configure the firewall using the iptables CLI as the root user. If you are already familiar with iptables this can be the quickest and most powerful way to create and manage your firewall.

Note   If you do not have strong iptables knowledge, use the Web Administration Interface to configure the firewall.

Follow these steps:

  1. Log in to the appliance using the default administrator account (user name admin ) and use su - to switch to the root user after logging in. You can log in locally or using SSH. For more information, see Connect to consoles and user interfaces.
  2. Enter the required iptables commands.

For an iptables command reference, go to:

Disable the firewall on the command line

To stop and disable the firewall issue the following commands (output included for clarity):

# service iptables stop
Flushing firewall rules:                                   [  OK  ]
Setting chains to policy ACCEPT: nat mangle filter         [  OK  ]
Unloading iptables modules:                                [  OK  ]
# chkconfig iptables off

To ensure that the service is indeed stopped and disabled on subsequent system boots run:

# service iptables status
Firewall is stopped.
# chkconfig --list iptables
iptables       0:off1:off2:off3:off4:off5:off6:off

Related Links