How to Install system-config-firewall-tui on Linux CentOS 6.2 Server

In this post, i will guide you on how to install system-config-firewall-tui on linux CentOS 6.2 server. This steps may working on other version such as CentOS 5.1, CentOS 5.2, CentOS 5.3, CentOS 5.4, CentOS 5.5, CentOS 5.6, CentOS 5.7, CentOS 6.0 and CentOS 6.1. system-config-firewall is a graphical user interface for setting basic firewall rules. For those who are not familiar in command line iptables, system-config-firewall-tui is the solution for them. Follow this steps to install and use system-config-firewall-tui on linux CentOS 6.2 server.

1. Perform yum install using the following command :

yum install system-config-firewall-tui -y
[root@centos62 ~]# yum install system-config-firewall-tui -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.hostemo.com
 * epel: ftp.cuhk.edu.hk
 * extras: mirrors.hostemo.com
 * updates: mirrors.hostemo.com
CentOS6.2-Repository                                                         | 4.0 kB     00:00 ...
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package system-config-firewall-tui.noarch 0:1.2.27-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                          Arch         Version             Repository                  Size
====================================================================================================
Installing:
 system-config-firewall-tui       noarch       1.2.27-5.el6        CentOS6.2-Repository        37 k

Transaction Summary
====================================================================================================
Install       1 Package(s)

Total download size: 37 k
Installed size: 59 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : system-config-firewall-tui-1.2.27-5.el6.noarch                                   1/1

Installed:
  system-config-firewall-tui.noarch 0:1.2.27-5.el6

Complete!

2. To start configure your iptables using “system-config-firewall-tui”, run the following command :

[root@centos62 ~]# system-config-firewall-tui

system-config-firewall-tui
3. After any changes, please restart your iptables using this command :

[root@centos62 ~]# service iptables restart

or

[root@centos62 ~]# /etc/init.d/iptables restart

How to Disable iptables on Linux CentOS 5.7 Server

Iptables is used to set up, maintain, and inspect the tables of IPv4 packet filter rules in the Linux kernel. It can run as a host based firewall if properly configured. Iptables places rules into predefined chains (INPUT, OUTPUT and FORWARD) that are checked against any network traffic packets. In certain case, system administrator will need to disable this iptables due to some reasons. In this post, i will show the quick step to disable iptables on linux CentOS 5.7 server. This steps may working on other version such as CentOS 5.1, CentOS 5.2, CentOS 5.3, CentOS 5.4, CentOS 5.5 and CentOS 5.6.

1. How to stop iptables on Linux RHEL 5/CentOS 5 server :

[root@CentOS57 ~]# service iptables stop

or

[root@CentOS57 ~]# /etc/init.d/iptables stop

How to stop ip6tables on Linux RHEL 5/CentOS 5 server :

[root@CentOS57 ~]# service iptables stop

or

[root@CentOS57 ~]# /etc/init.d/ip6tables stop

Note : Ignore this steps if ipv6 not configured or disabled
2. To ensure that iptables will not start after rebooting, please run this chkconfig command :

[root@CentOS57 ~]# chkconfig iptables off

3. How to check iptables status on Linux RHEL 5/CentOS 5 server. Make sure that it was stop :

[root@CentOS57 ~]# service iptables status
Firewall is stopped.

or

[root@CentOS57 ~]# /etc/init.d/iptables status
Firewall is stopped.

How to Install system-config-firewall package on RHEL 6

In this post, i will show oh how to install system-config-firewall package on Red Hat Enterprise Linux 6 (RHEL 6). The system-config-firewall packages contain a graphical user interface for basic firewall setup.

If the system does not install with system-config-firewall package, you will get this error message :

[root@rhel6 ~]# system-config-firewall
-bash: /usr/bin/system-config-firewall: No such file or directory

How to Setup Local Yum Repository from CD-ROM/DVD-ROM image on RHEL 6

To install system-config-firewall package, simply run this command :

[root@rhel6 ~]# yum install system-config-firewall -y
Loaded plugins: rhnplugin
This system is not registered with RHN.
RHN support will be disabled.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package system-config-firewall.noarch 0:1.2.27-1.el6 set to be updated
--> Processing Dependency: python-slip-dbus >= 0.2.7 for package: system-config-firewall-1.2.27-1.el6.noarch
--> Processing Dependency: pygtk2-libglade for package: system-config-firewall-1.2.27-1.el6.noarch
--> Processing Dependency: pygtk2 for package: system-config-firewall-1.2.27-1.el6.noarch
--> Running transaction check
---> Package pygtk2.i686 0:2.16.0-3.el6 set to be updated
---> Package pygtk2-libglade.i686 0:2.16.0-3.el6 set to be updated
--> Processing Dependency: libglade-2.0.so.0 for package: pygtk2-libglade-2.16.0-3.el6.i686
---> Package python-slip-dbus.noarch 0:0.2.11-1.el6 set to be updated
--> Processing Dependency: python-slip = 0.2.11-1.el6 for package: python-slip-dbus-0.2.11-1.el6.noarch
--> Processing Dependency: python-decorator for package: python-slip-dbus-0.2.11-1.el6.noarch
--> Running transaction check
---> Package libglade2.i686 0:2.6.4-3.1.el6 set to be updated
--> Processing Dependency: xml-common for package: libglade2-2.6.4-3.1.el6.i686
---> Package python-decorator.noarch 0:3.0.1-3.1.el6 set to be updated
---> Package python-slip.noarch 0:0.2.11-1.el6 set to be updated
--> Processing Dependency: libselinux-python for package: python-slip-0.2.11-1.el6.noarch
--> Running transaction check
---> Package libselinux-python.i686 0:2.0.94-2.el6 set to be updated
---> Package xml-common.noarch 0:0.6.3-32.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                       Arch          Version              Repository                   Size
====================================================================================================
Installing:
 system-config-firewall        noarch        1.2.27-1.el6         DVD-RHEL6-Repository        118 k
Installing for dependencies:
 libglade2                     i686          2.6.4-3.1.el6        DVD-RHEL6-Repository         60 k
 libselinux-python             i686          2.0.94-2.el6         DVD-RHEL6-Repository        197 k
 pygtk2                        i686          2.16.0-3.el6         DVD-RHEL6-Repository        925 k
 pygtk2-libglade               i686          2.16.0-3.el6         DVD-RHEL6-Repository         22 k
 python-decorator              noarch        3.0.1-3.1.el6        DVD-RHEL6-Repository         14 k
 python-slip                   noarch        0.2.11-1.el6         DVD-RHEL6-Repository         26 k
 python-slip-dbus              noarch        0.2.11-1.el6         DVD-RHEL6-Repository         28 k
 xml-common                    noarch        0.6.3-32.el6         DVD-RHEL6-Repository        9.4 k

Transaction Summary
====================================================================================================
Install       9 Package(s)
Upgrade       0 Package(s)

Total download size: 1.4 M
Installed size: 5.2 M
Downloading Packages:
----------------------------------------------------------------------------------------------------
Total                                                               4.6 MB/s | 1.4 MB     00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : pygtk2-2.16.0-3.el6.i686                                                     1/9
  Installing     : python-decorator-3.0.1-3.1.el6.noarch                                        2/9
  Installing     : xml-common-0.6.3-32.el6.noarch                                               3/9
  Installing     : libglade2-2.6.4-3.1.el6.i686                                                 4/9
  Installing     : pygtk2-libglade-2.16.0-3.el6.i686                                            5/9
  Installing     : libselinux-python-2.0.94-2.el6.i686                                          6/9
  Installing     : python-slip-0.2.11-1.el6.noarch                                              7/9
  Installing     : python-slip-dbus-0.2.11-1.el6.noarch                                         8/9
  Installing     : system-config-firewall-1.2.27-1.el6.noarch                                   9/9

Installed:
  system-config-firewall.noarch 0:1.2.27-1.el6

Dependency Installed:
  libglade2.i686 0:2.6.4-3.1.el6                    libselinux-python.i686 0:2.0.94-2.el6
  pygtk2.i686 0:2.16.0-3.el6                        pygtk2-libglade.i686 0:2.16.0-3.el6
  python-decorator.noarch 0:3.0.1-3.1.el6           python-slip.noarch 0:0.2.11-1.el6
  python-slip-dbus.noarch 0:0.2.11-1.el6            xml-common.noarch 0:0.6.3-32.el6

Complete!

To run GUI option for system-config-firewall package, please execute the following command :

[root@rhel6 ~]# system-config-firewall

system-config-firewall

The system-config-firewall package tool only configures a basic firewall. If the system needs more complex rules and policies, you need Iptables setting.

How to Disable Firewall on RHEL 6

In this post, i will show how to disable Linux Iptables Firewall on Red Hat Enterprise Linux 6 (RHEL 6). A Linux firewall on RHEL 6 can be configured to filter every network packet that passes into or out of network. In some cases such as testing and development environment, you will need to disable the iptables firewall. To disable linux iptables firewall on RHEL6, you just to execute the following commands :

1. Before stop the iptables, save the firewall setting using the following command :

[root@rhel6 ~]# service iptables save
iptables: Saving firewall rules to /etc/sysconfig/iptables:[  OK  ]

2. Stop iptables using the following command :

[root@rhel6 ~]# service iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]

3. To ensure that iptables will not started at boot time, pleas execute this chkconfig command :

[root@rhel6 ~]# chkconfig iptables off

4. If IPv6 firewall is enabled, please disable it using the following commands :

[root@rhel6 ~]# service ip6tables save
ip6tables: Saving firewall rules to /etc/sysconfig/ip6table[  OK  ]
[root@rhel6 ~]# service ip6tables stop
ip6tables: Flushing firewall rules:                        [  OK  ]
ip6tables: Setting chains to policy ACCEPT: filter         [  OK  ]
ip6tables: Unloading modules:                              [  OK  ]
[root@rhel6 ~]# chkconfig ip6tables off