Firewall Configuration from a Terminal

Skilled Illusionist
Joined
Oct 21, 2010
Messages
340
Reaction score
184
Here is another way to setup your CentOS Firewall via a remote or local server with root access.

Firewall Configuration from a Terminal

In addition to the graphical Security Level Configuration tool, CentOS also includes the command-line firewall configuration tool that enables configuration changes to be made from a terminal window.
To launch, start a terminal session to access the command prompt (right click on the desktop background and select Terminal from the resulting menu) and type the following at the command-line prompt:

system-config-securitylevel

To access this screen use the Tab key to navigate to the Customize button at the bottom of the screen. Once Customize is highlighted, press the Enter or Space key to select it. The Customization screen should appear as follows:

To activate or deactivate an option use the Tab key to navigate to the required option and press the space bar to toggle the selection. Activated options are marked with an asterisk (*).
To specify a specific port, enter the port number and protocol into the Other ports field in the form of port:protocol. When you have finished making selections tab to the OK button to return to the main screen and tab to OK again to exit . The customization screen also allows trusted interfaces and masquerading to be configured.
Trusted Interfaces

A trusted interface is a network adapter (either physical or software based) on which traffic is known to be coming from a secure network environment. For example, a CentOS system acting as a firewall for an internal network might contain two network adapters, one of which is connected via a gateway or modem to the internet while the other is connected to the secure internal network. In such a situation, the first adapter would be configured as untrusted, since it is exposed to traffic from the outside world. Assuming the internal network is protected by the firewall and other intrusion prevention measures, the second adapter can be considered to be trustworthy.



Enable firewall

Type the following command as the root user to enable firewall.
# service iptables start
# chkconfig iptables on

Check status of Firewall
# service iptables status

Enable your ports that is needed for your server ect 38101 and 38121 - Credits Yamachi

This is how I setup my firewall on my server and it works great.

This is also a great program for your CentOS side.







Credits: techotopia.com & digitalocean.com
for guide and images
 
Last edited:
So how to enable those ports ? firewall doesint respond


[root@localhost ~]# service iptables start
[root@localhost ~]# chkconfig iptables on
[root@localhost ~]# service iptables status
Firewall is stopped.
[root@localhost ~]#
 
its fixed now :) TY
But I have other problem I dont even understand this.. :D 312312 - Firewall Configuration from a Terminal - RaGEZONE Forums

This is IMG when My CENTOS IS turning on :))

THANKS!
 
Back