Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




< Previous Section: Configurating Linux Services

5        Linux Firewall – The Second Line of Defense

In previous chapters we have covered the firewall located in the router or cable modem and viewed this as the first line of defense in protecting your Linux system from outside attack. In this chapter we will be looking at the second line of defense – the firewall on your Linux system. 

During the installation of your Linux system you will have been asked a number of questions about the security settings you wanted to select. At the time you may not have understood what these settings meant or you may not recall which settings you chose. In  this Chapter we will explore how to configure the security settings of your Linux system.

5.1   The lokkit command

The lokkit command can be run at any time to change the security settings of Firewall installed on your system. To run this command you must first login as root or use the “su” command. If you are already super user on your Linux system start the lokkit command as follows:


or to use the su command from a non-super user account as follows: 

                su –c “/usr/sbin/lokkit”

The lokkit command allows you to either enable or disable the Firewall. The first step if it is not already enabled is to enable it. Use the “Tab” key to move around and the “Space” key to select the “Enabled” option.

The second step is configure the Firewall. Use the Tab key to move the “Configure” button and press the “Space” key.

On the configuration screen simply select the service types that you want to support. Based on your selections lokkit will configure the Firewall to allow access to the appropriate ports. The services listed are HTTP, FTP, SSH, Telnet and Mail (SMTP). You can also specify other ports you wish to open on the Firewall in the “other ports” section.

The lokkit command also provides the option of specifying trusted devices on the "Configure" screen. In summary, it is possible to have more than one network device installed on a Linux system. In this scenario it might be that one device is connected to a trusted and secure network while the other is connected to a network that is connected to the outside world in some way (perhaps through a router or firewall to a broadband connection). The firewall feature allows you to disable the firewall settings for any connections coming in from the device connected to the trusted or secure network while applying the firewall rules to device connected ot the untrusted network.

< Previous Section: Configurating Linux Services

  © Copyright 2005-2010 Linuxtopia. All Rights Reserved.