<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
> <channel><title>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; linux security</title> <atom:link href="http://www.ghacks.net/tag/linux-security/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Sat, 11 Feb 2012 09:52:46 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>openSUSE 11.4 security settings</title><link>http://www.ghacks.net/2011/03/20/opensuse-11-4-security-settings/</link> <comments>http://www.ghacks.net/2011/03/20/opensuse-11-4-security-settings/#comments</comments> <pubDate>Sun, 20 Mar 2011 16:01:30 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[linux distribution]]></category> <category><![CDATA[linux security]]></category> <category><![CDATA[logins]]></category> <category><![CDATA[opensuse]]></category> <category><![CDATA[YaST]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=42838</guid> <description><![CDATA[Since doing my first reviews of openSUSE 11.4 I have become a big fan. Not only is it one of the most stable and reliable distributions to date, it also offers KDE 4.6, LibreOffice, and a whole slew of other features that should appeal to most Linux users. And openSUSE can be used by nearly [...]]]></description> <content:encoded><![CDATA[<p>Since doing my first reviews of openSUSE 11.4 I have become a big fan. Not only is it one of the most stable and reliable distributions to date, it also offers KDE 4.6, LibreOffice, and a whole slew of other features that should appeal to most Linux users. And openSUSE can be used by nearly any experience level. Although not perfectly suited for new users (the Add/Remove Software tool being one of the only shortcomings), even Linux gurus can enjoy this fantastic release.</p><p>One of the features the more advanced user will appreciate is the Security settings available in YaST2. The amount of detail given to security in this release is stunning&#8230;but not necessarily built for the new user. I want to highlight the openSUSE security settings so you can see for yourself just how granular you can be with openSUSE security.</p><p><span
id="more-42838"></span><strong>Where to find security?</strong></p><div
id="attachment_42839" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/03/yast_security.png"><img
class="size-medium wp-image-42839 " src="http://www.ghacks.net/wp-content/uploads/2011/03/yast_security-550x358.png" alt="" width="330" height="215" /></a><p
class="wp-caption-text">Figure 1</p></div><p>By default, of the security settings you are about to see are installed in openSUSE 11.4. In order to open up the Security Settings window click on Start &gt; Computer &gt; Administrator Settings (YaST). Once in YaST click on the Security and Users section (see Figure 1).</p><p>From there you will find a few security features to configure:</p><ul><li>Firewall: Configure your firewall on your system.</li><li>Security Center and Hardening: Configure numerous security settings.</li><li>Sudo: Graphic interface for managing sudo.</li></ul><p>I want to concentrate on the Security Center in YaST. Click on that entry in the Security and Users section and a new window will open.</p><p><strong>Security and Hardening</strong></p><div
id="attachment_42841" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/03/security_and_hardending.png"><img
class="size-medium wp-image-42841 " src="http://www.ghacks.net/wp-content/uploads/2011/03/security_and_hardending-550x376.png" alt="" width="330" height="226" /></a><p
class="wp-caption-text">Figure 2</p></div><p>From within the Security and Hardening window (see Figure 2) you will have numerous settings available to you. In the security overview you get a good idea of what is enabled/disabled on your system. From that same section you can enable, disable, or configure those options. Some of the more handy options are:</p><p>Remote access to the display manager: Allow remote access to KDM.</p><p>Remote access to X server: Enable remote access to X windows.</p><p>Use secure file permissions: You can set your file permissions from three different levels (easy, secure, paranoid).</p><p>Another section in this window that is of great interest is pre-defined security settings. From here you can select from four different settings:</p><ul><li>Home Workstation</li><li>Networked Workstation</li><li>Network Server</li><li>Custom</li></ul><p>If you do not want to monkey around with too many of the security settings, I highly recommend you select one of the first three options here.</p><p>If you look at the Password section you will be surprised to find you can actually configure password checks as well as password expiration. If you have multiple users on your system, and you want to make sure your users are setting solid passwords, make sure you configure these sections. Here you can set the following:</p><ul><li>Minimum password length.</li><li>Number of passwords to remember.</li><li>Password encryption method.</li><li>Password age (min and max).</li><li>Days before Password Expires Warning.</li></ul><p>Finally, you should take a look at the login section. Here you can set the amount of incorrect login attempts that can occur before a delay is forced. You can also enable/disable remote graphical login.</p><p><strong>Final thoughts</strong></p><p>Although openSUSE is not generally consider among the most secure Linux distributions, if administered properly it can easily stand toe to toe with any distribution available. And having the YaST security options readily available makes configuring openSUSE security a simple endeavor.<strong><br
/> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/03/20/opensuse-11-4-security-settings/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Introduction to iptables</title><link>http://www.ghacks.net/2010/06/14/introduction-to-iptables/</link> <comments>http://www.ghacks.net/2010/06/14/introduction-to-iptables/#comments</comments> <pubDate>Mon, 14 Jun 2010 19:48:30 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Server]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[chains]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[linux security]]></category> <category><![CDATA[packet traffic]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=26547</guid> <description><![CDATA[If you&#8217;ve been around Linux long enough you know there are many ways to secure your box. What you may or may not know is that a number of those means are simply front-ends for the all-mighty iptables tool. IPtables is a very powerful, complicated system which can control packet traffic on your system. It [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve been around Linux long enough you know there are many ways to secure your box. What you may or may not know is that a number of those means are simply front-ends for the all-mighty <em>iptables </em>tool. IPtables is a very powerful, complicated system which can control packet traffic on your system. It can deny, reject, allow, route, and do just about anything else you want to do with that traffic&#8230;all from the command line. Of course, along with this power, comes some serious complexity.</p><p>That complexity is what an introductory article is needed. I have seen plenty of users try to just jump into the heart and soul of iptables, only to see them fail miserably. To fully understand iptables one must first understand how iptables is actually used. In this article I will help you to understand the fundamentals of iptables so later on we can further that knowledge with more in-depth scripts and commands.</p><p><span
id="more-26547"></span><strong>What IS iptables?</strong></p><p>As I mentioned earlier, iptables is a powerful way to control packet traffic to and from your Linux box. But how does it manage this?  It does so by creating TABLES made up of CHAINS. There are three types of chains:</p><ul><li>INPUT: Controls packets coming in.</li><li>OUTPUT: Controls packets going out.</li><li>FORWARD: Controls packets that are forwarded.</li></ul><p>These are also applied to the default policies. When you install a Linux operating system it will have three pre-defined iptables chains (one for each of the above).</p><p>Now each chain can handle the packet traffic in one of four different ways (actions):</p><ul><li>ACCEPT: Allow the packet in/out.</li><li>REJECT: The target device will reject the packet.</li><li>DROP: The packet is immediately dropped and the target device never sees said packet.</li><li>RETURN: Go to another chain in your table as if it never saw the rejecting chain.</li></ul><p>So now you have a TABLE made up of CHAINS that use ACTIONS to route traffic. Is this getting any easier? Now, you can also have more than one TABLE on a machine &#8211; but that is far too complex for an introductory article. Your machine will also have a default POLICY for each chain (INPUT, OUTPUT, FORWARD). By default these POLICIES are typically set to the action ACCEPT.</p><p>You must also understand that when a packet arrives on a machine it must traverse the iptables CHAIN until it either matches a CHAIN rule or it passes through all rules unscathed. Because of this you want to create your chains carefully. If you do not you can wind up with traffic you want to ACCEPT getting REJECTed because of a poorly ordered chain. For example:</p><p>Let&#8217;s say you want to ACCEPT all ssh traffic within your internal network safe passage to your machines. But what if you have a CHAIN rule that REJECTS ssh traffic in place before that internal rule? If you do this all internal ssh traffic will be REJECTed as well. In this case you would want your TABLE chain order like so:</p><p>CHAIN ACCEPTing incoming LAN ssh traffic</p><p>CHAIN REJECTing incoming WAN ssh traffic</p><p>Let&#8217;s take a look at how you use <em>itables</em> as a command to create or change POLICY chains.</p><p><strong>Usage</strong></p><div
id="attachment_26554" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/iptables_l.png"><img
class="size-medium wp-image-26554 " src="http://www.ghacks.net/wp-content/uploads/2010/06/iptables_l-500x352.png" alt="" width="300" height="211" /></a><p
class="wp-caption-text">Figure 1</p></div><p>If you issue the command <em>iptables -L </em>all of your current chains will be listed like what you see in Figure 1. NOTE: The <em>iptables </em>command MUST be run as either the root user or with the help of <em>sudo.</em></p><p>As you can see, in my output, my TABLE consists of the three default policy CHAINS and each is currently set to the action ACCEPT.  What if I want to change my INPUT policy to DROP? After all, do you want incoming traffic to have total access to your machine? You can set the input POLICY to DROP with the following command:</p><p><em>sudo iptables -P INPUT DROP</em></p><p>What you have effectively done above is set your default INPUT POLICY to REJECT. So without creating any new CHAINS all incoming traffic to that machine will be REJECTED. Here&#8217;s the problem with that&#8230;say, for instance, you want to allow ssh traffic into that machine? If you leave it as is this will not happen. Because you have the INPUT POLICY set to REJECT and you have no other CHAINS in place, no incoming traffic will work. Remember, though, what I said about creating CHAINS in the right order to ensure needed traffic can find safe passage.</p><p><strong>Final thoughts</strong></p><p>Thus begins our journey with iptables. It&#8217;s not the most simple system to employ, but it certainly is powerful.  Is it worth the time and effort when there are so many GUI tools to choose from? That depends upon your needs. If you are working on nothing more than a desktop &#8211; then the GUI front-end will more than likely be enough. If, however, you have a server with mission-critical or sensitive data you might need the extra power and flexibility that iptables brings to the table.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/06/14/introduction-to-iptables/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Get to know Linux: AppArmor</title><link>http://www.ghacks.net/2010/03/24/get-to-know-linux-apparmor/</link> <comments>http://www.ghacks.net/2010/03/24/get-to-know-linux-apparmor/#comments</comments> <pubDate>Wed, 24 Mar 2010 11:08:42 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[linux security]]></category> <category><![CDATA[SELinux]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23930</guid> <description><![CDATA[You&#8217;ve heard that Linux is a very secure operating system. You&#8217;ve heard it&#8217;s practically immune to viruses (practically being the key word). You&#8217;ve heard it&#8217;s tough to crack. These are all true&#8230;and with good reason. Linux is such a strong operating system for two primary reasons &#8211; by design and with the help of security [...]]]></description> <content:encoded><![CDATA[<p>You&#8217;ve heard that Linux is a very secure operating system. You&#8217;ve heard it&#8217;s practically immune to viruses (practically being the key word). You&#8217;ve heard it&#8217;s tough to crack. These are all true&#8230;and with good reason. Linux is such a strong operating system for two primary reasons &#8211; by design and with the help of security systems like AppArmor and SELinux.</p><p>But what is AppArmor? AppArmor is a security module implementation of name-based access controls. In other words, AppArmor protects your system against the exploitation of program flaws and compromises. This protection is done via profiles that will set a program to either &#8220;complain&#8221; or &#8220;enforce&#8221; against wrong doing.</p><p>In this article I will show you how to install AppArmor and how to use it to set an application in either &#8220;complain&#8221; or &#8220;enforce&#8221; mode.</p><p><span
id="more-23930"></span><strong>Installation</strong></p><p>The installation of AppArmor is simple:</p><ol><li>Open up Synaptic (or your favorite package manager).</li><li>Search for &#8220;apparmor&#8221; (no quotes).</li><li>Select apparmor for installation (make sure apparmor-utils and apparmor-profiles are installed as well).</li><li>Click Apply to install.</li></ol><p>That&#8217;s it. You are now ready to begin working with AppArmor.</p><p><strong>Usage</strong></p><p>AppArmor is a command-line only tool. It uses two particular commands for setting an application to either &#8220;complain&#8221; (<em>aa-complain</em>) or &#8220;enforce&#8221; (<em>aa-enforce</em>). There is also one other tool that is useful &#8211; <em>apparmor_status</em>. Let&#8217;s take a look at that command first.</p><p>You want to know the current status of AppArmor and what applications are currently in what mode. To find this out issue the command <em>sudo apparmor_status</em>. You should see listings similar to:</p><p><code>32 profiles are loaded.<br
/> 12 profiles are in enforce mode.<br
/> /sbin/dhclient3<br
/> /usr/bin/evince<br
/> /usr/bin/evince-previewer<br
/> /usr/bin/evince-thumbnailer<br
/> /usr/lib/NetworkManager/nm-dhcp-client.action<br
/> ...<br
/> 20 profiles are in complain mode.<br
/> /bin/ping<br
/> /sbin/klogd<br
/> /sbin/syslog-ng<br
/> /sbin/syslogd<br
/> /usr/lib/dovecot/deliver<br
/> /usr/lib/dovecot/dovecot-auth<br
/> ...</code></p><p>NOTE: I truncated the output to save space.</p><p>As you can see there are already certain applications in complain mode and certain applications in enforce mode. But what are these &#8220;modes&#8221;? Simple &#8220;complain&#8221; mode will log violations against the applications profile, whereas &#8220;enforce&#8221; will strictly enforce the applications profile. But what are (and where are) the profiles? You will find profiles for applications in <strong>/etc/apparmor.d</strong>. Each profile has its own settings, but all of them will have some unique characteristics. For example, with AppArmor you can define that an application have access to it&#8217;s configuration files using the &#8220;r&#8221; switch as in the <strong>/etc/apparmor.d/usr.sbin.dovecot</strong> profile line:</p><p><em>/etc/dovecot/** r</em></p><p>Creating a profile is a bit beyond the scope of this article (we&#8217;ll revisit this topic later).</p><p>Now, let&#8217;s change an application from <em>complain</em> to <em>enforce.<strong> </strong></em>Look back at our <em>apparmor_status</em> output. Let&#8217;s switch the <em>dovecot </em>application from <em>complain </em>to <em>enforce.</em> To do this we use the <em>aa-enforce </em>command like so:</p><p><em>sudo aa-enforce /usr/sbin/dovecot</em></p><p>When you issue this command you will see the results appear immediately:</p><p><em>Setting /usr/sbin/dovecot to enforce mode.</em></p><p>To switch a command from enforce to complain you use the <em>aa-complain </em>command like so:</p><p><em>sudo aa-complain /usr/sbin/dovecot</em></p><p>Which will return the results:</p><p><em>Setting /usr/sbin/dovecot to complain mode.</em></p><p>You can run <em>apparmor_status</em> after you make changes to your applications to make sure the changes remain.</p><p><strong>Final thoughts</strong></p><p>AppArmor is a crucial piece of the Linux security puzzle. Without this application it would be much easier to exploit the weaknesses in numerous applications. As a Linux administrator, you owe it to yourself to further your knowledge of this tool. Later we will revisit AppArmor and create/edit profiles for applications.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/03/24/get-to-know-linux-apparmor/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Quick and easy Linux security</title><link>http://www.ghacks.net/2010/02/02/quick-and-easy-linux-security/</link> <comments>http://www.ghacks.net/2010/02/02/quick-and-easy-linux-security/#comments</comments> <pubDate>Tue, 02 Feb 2010 21:58:14 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[chmod]]></category> <category><![CDATA[desktop security]]></category> <category><![CDATA[firewall]]></category> <category><![CDATA[linux desktop]]></category> <category><![CDATA[linux security]]></category> <category><![CDATA[root kit]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22745</guid> <description><![CDATA[You&#8217;ve just set up your Linux desktop. Naturally you want it to be as secure as possible. You&#8217;ve heard the rumors that, out of the box, Linux has outstanding security. Is it true? Do you really want to take a chance with that? Most likely not. But what can you do? There are tons of [...]]]></description> <content:encoded><![CDATA[<p>You&#8217;ve just set up your Linux desktop. Naturally you want it to be as secure as possible. You&#8217;ve heard the rumors that, out of the box, Linux has outstanding security. Is it true? Do you really want to take a chance with that? Most likely not. But what can you do? There are tons of firewall tools you can use (take a look at my article &#8220;<a
title="Build a custom Linux firewall with fwbuilder" href="http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/" target="_blank">Build a custom firewall with fwbuilder</a>&#8221; for an example). But outside of setting up a firewall on your machine, what can you do to boost the security on your desktop?</p><p>In this article you will learn some very simple steps you can take to help make your Linux desktop a bit more secure than &#8220;out of the box&#8221;. These steps can be done by any level of user, so don&#8217;t think you will be doing any recompiling or creating iptables chains.</p><p><span
id="more-22745"></span><strong>No auto login</strong></p><p>When you first install many distros, you will be asked if you want your user to auto login. This is a bad idea if you are in an environment you can&#8217;t fully trust. If there are other users around, you do not want them using your account. To help avoid this disable auto login. On the GNOME desktop go to <strong>System &gt;Administration &gt; Login Screen</strong>. When the Login Screen Settings window opens follow these steps:</p><ul><li>Click the Unlock button.</li><li>Enter your password when prompted.</li><li>Check the Show the screen for choosing who will log in.</li><li>Click Close.</li></ul><p>Now when you are done using your desktop log out. The only way to get back in will be to log in.</p><p><strong>Encrypt your ~/ directory</strong></p><p>During installation many distributions give you the option of encrypting your <strong>~/ </strong>directory. This will give you an added means of security &#8211; especially if your machine is stolen. With the <strong>~/ </strong>directory being encrypted, even when the thief can not log into your user account, they will not be able to read your encrypted directory without the decryption key. That makes for some fairly safe data.</p><p><strong>Don&#8217;t run unnecessary services</strong></p><p>There are certain services you may not need on your machine. Some services can lead to a less-than-secure environment. Instead of allowing these services to continue running, stop them at boot time. Each distribution handles this differently. You can see how different distributions handle this in my article &#8220;<a
title="Starting services at boot in Linux" href="http://www.ghacks.net/2009/11/04/starting-services-at-boot-in-linux/" target="_blank">Starting services at boot in Linux</a>&#8220;. Shut down those unwanted services and gain a bit more security.</p><p><strong>Run a simple firewall</strong></p><p>Don&#8217;t bother getting too complicated with your desktop firewall. But if you are really paranoid, employ a simple tool like <em>ufw</em> (Uncomplicated Fire Wall). In Ubuntu ufw is installed by default. You can start it like so (from the command line):</p><p><em>sudo ufw enable</em></p><p>You can disable it like so:</p><p><em>sudo ufw disable</em></p><p><strong>Install rkhunter</strong></p><p>Root kits are a danger to any operating system. You will want to install a tool to check for root kits the minute your operating system is up and running. The best (and easiest) root kit tool is <em>rkhunter</em>. For information on installing and using rkhunter, read my article &#8220;<a
title="Check for root kits with rkhunter" href="http://www.ghacks.net/2009/04/29/check-for-root-kits-with-rkhunter/" target="_blank">Check for root kits with rkhunter</a>&#8220;.</p><p><strong>Shut down that P2P</strong></p><p>I use P2P tools. But when I am done searching (and/or downloading) I shut that tool down. Why? Unwanted access. There is no real reason to leave your machine open to unknown users. So instead of leaving that P2P tool open for business, shut it down.</p><p><strong>Careful with 666 and 777</strong></p><p>When you chmod a file (or directory) use caution when given them either 666 or 777 file permissions (rw-rw-rw- and rwxrwxrwx respectively). This is especially true on a file (or directory) containing sensitive data. For those files either only allow read access to group and other or encrypt the file so only those with the encryption key have access. Using either 666 and/or 777 without careful thought is reckless on a Linux machine and can lead to security issues.</p><p><strong>Final thoughts</strong></p><p>There are so many more tips you can go through &#8211; some of which might seem common sense to many &#8211; that can lead to a more secure environment. But the most important tip I can give to you is to think before you execute. Don&#8217;t just randomly do something without knowing the end results first. In the case of security the old Benjamin Franklin quote &#8220;An ounce of prevention is worth a pound of cure.&#8221; holds very true.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/02/02/quick-and-easy-linux-security/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Build a custom firewall with fwbuilder</title><link>http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/</link> <comments>http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/#comments</comments> <pubDate>Fri, 18 Sep 2009 03:23:39 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[firewall builder]]></category> <category><![CDATA[fwbuilder]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[linux security]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=16443</guid> <description><![CDATA[For the Linux operating system there are plenty of possibilities when it comes to firewalls. One possible option is Firestarter (You can read my &#8220;introductory&#8221; article &#8220;Firestarter: Simple to use desktop firewall&#8221; for an example of one such tool). You could also get very granular with the command line tool iptables. Of course most administrators [...]]]></description> <content:encoded><![CDATA[<p>For the Linux operating system there are plenty of possibilities when it comes to firewalls. One possible option is Firestarter (You can read my &#8220;introductory&#8221; article &#8220;<a
title="Firestarter" href="http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/" target="_blank">Firestarter: Simple to use desktop firewall</a>&#8221; for an example of one such tool). You could also get very granular with the command line tool iptables. Of course most administrators do not have the time or inclination to deal with such heavy-hitting tools as iptables (if you do have the time, however, iptables is incredibly powerful). So where do you go to get something user-friendly AND powerful? One such option is <a
title="Fwbuilder" href="http://www.fwbuilder.org" target="_blank">fwbuilder</a>.</p><p>Fwbuilder is a powerful firewall creation tool that works by adding objects to build a customized firewall. An object can be just about anything from a firewall, a library, a host, interface, address, DNS name, etc. The idea is you piece objects together to form a cohesive whole that works together to form a complete firewall. The only problem most run into is, when you fire up fwbuilder, where do you start? It may seem a bit confusing at first, but you know where the first step is, the rest of the journey is pretty clear.</p><p><span
id="more-16443"></span><strong>Installing fwbuilder</strong></p><p>I will touch briefly on installing fwbuilder, because it will not be found on your default system. And although you will find fwbuilder in your respository, it will be an outdated version. So to install the latest version first open up your <strong>/etc/apt/sources.list </strong>file and add the following (Note: I am installing this on Ubuntu 9.04.):</p><p><code>deb http://www.fwbuilder.org/deb/stable/ jaunty contrib</code></p><p>Before you update apt you will need to add the <a
title="GPG key" href="http://www.fwbuilder.org/PACKAGE-GPG-KEY-fwbuilder.asc" target="_blank">GPG key</a>. Download that key and then issue the command:</p><p><em>sudo apt-key add PACKAGE-GPG-KEY-fwbuilder.asc</em></p><p>Now issue the command:</p><p><em>sudo apt-get update</em></p><p>Finally you can install with the command:</p><p><em>sudo apt-get install fwbuilder</em></p><p>Once installed you will find fwbuilder in the Administration sub-menu of the System menu (The entry will be labeled Firewall Builder).</p><p><strong>Building a firewall</strong></p><div
id="attachment_16445" class="wp-caption alignleft" style="width: 473px"><a
rel="attachment wp-att-16445" href="http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/fwbuilder_main/"><img
class="size-full wp-image-16445" src="http://www.ghacks.net/wp-content/uploads/2009/09/fwbuilder_main.png" alt="Figure 1" width="463" height="385" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you start up fwbuilder the main window (see Figure 1) will not seem very intuitive. The first thing you need to do is create a new firewall. To create a new firewall click the Object drop-down which is the icon to the immediate left of the User drop-down. Or you click the Object menu and select New Object (which will open the Object drop-down menu). From this drop-down select New Firewall.</p><p>When you add a new firewall object a wizard will appear. Before you can move beyond the first screen you have to do the following:</p><ul><li>Name your firewall.</li><li>Select the firewall software the machine is running.</li><li>Select the OS the firewall is running on.</li></ul><p>In the first screen of this wizard is a very important option (if you want to make life easy for yourself). You can base your firewall on pre-configured templates. For new users this is always a good place to start. And even though you choose a pre-configured template, you can still customize this firewall.</p><p>But we&#8217;re building a customized firewall, so no templates here.</p><div
id="attachment_16447" class="wp-caption alignright" style="width: 239px"><a
rel="attachment wp-att-16447" href="http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/fwbuilder_devices-2/"><img
class="size-full wp-image-16447" src="http://www.ghacks.net/wp-content/uploads/2009/09/fwbuilder_devices1.png" alt="Figure 2" width="229" height="269" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The next screen asks you how you want to define your interfaces. There are two methods: Manually and using SNMP to automatically discover the interfaces. Manually is the most reliable method of course so select that option and click Next.</p><p>In the device setup window (see Figure 2) you will enter the information for your networking device. Once you have entered this click Add. If you can&#8217;t figure out the MAC address you can always use the Networking Tool application under the Administration sub-menu of the System menu.</p><p>Once you have added the device click the Finish button. If you have a machine with two networking devices add your second device and then click Finish. You will now be in the window where you will add rules to your firewall. In the upper left pane click on the name of the firewall to open up the Desktop/Policy window (see Figure 3).</p><div
id="attachment_16448" class="wp-caption alignleft" style="width: 366px"><a
rel="attachment wp-att-16448" href="http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/fwbuilder_desktop/"><img
class="size-full wp-image-16448" src="http://www.ghacks.net/wp-content/uploads/2009/09/fwbuilder_desktop.png" alt="Figure 3" width="356" height="233" /></a><p
class="wp-caption-text">Figure 3</p></div><p>What you want to do is right click within the upper right pane and select &#8220;Insert Rule&#8221;. When the rule is inserted it will be fairly worthless. You will notice much of the policies are listed as &#8220;Any&#8221; or &#8220;All&#8221;. In order to change this you have to add new objects. Let&#8217;s say, for example, we want to create an address range that will cover our entire LAN to be used as a destination. To do this click on the Object drop-down and select New Address Range. The lower right pane will change where you can enter the values for your range. I will enter the following:</p><ul><li>Name: Internal LAN</li><li>Range Start: 192.168.1.1</li><li>Range End: 192.168.1.200</li></ul><p>You can add a comment if you like.</p><div
id="attachment_16449" class="wp-caption alignright" style="width: 366px"><a
rel="attachment wp-att-16449" href="http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/fwbuilder_new_object/"><img
class="size-full wp-image-16449" src="http://www.ghacks.net/wp-content/uploads/2009/09/fwbuilder_new_object.png" alt="Figure 4" width="356" height="233" /></a><p
class="wp-caption-text">Figure 4</p></div><p>Now click Apply and that object has been created. This is where the fun begins. As you can see (in Figure 4) my new object is listed in the lower left pane. What I do is click and drag that object into the section of the new rule I want to apply that object to. So I want the Internal Lan object to apply to the Destination section of the rule so I will drag it to that section to apply it.</p><p>Now create as many objects as you need for your firewall and click and drag them to apply them. But don&#8217;t think you have to limit yourself to one rule. You can add as many rules to this firewall as you need.</p><p>Once you have completed building your firewall right click the firewall name (in my example it would be Desktop from the upper left pane) and click &#8220;Compile&#8221;.  This will open up a compilation wizard that is simple to walk through. The compilation will create a file with the same name as the firewall and an extension of .fw.  After the compilation is complete right click the firewall name and select Install. The installation wizard is also a simple walkthrough of steps. You will have to give a user for the firewall to run under as well as the password for that user. Also you will have to select if you are going to run in test mode or not. If you are install the firewall in test mode it will not be permanent. If you install in regular mode fwbuilder will ask you how soon you want to reboot your machine (so the firewall can take effect.) I suggest running in test most first. If this works then go back through the Install process and allow for full installation (including reboot).</p><p><strong>Final thoughts</strong></p><p>Fwbuilder is a powerful tool that allows you to create very customized firewalls. I highly recommend this tool for anyone serious about Linux security.</p><p><strong><br
/> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/09/18/build-a-custom-firewall-with-fwbuilder/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Firestarter: Simple to use, powerful desktop firewall</title><link>http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/</link> <comments>http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/#comments</comments> <pubDate>Tue, 15 Sep 2009 17:08:58 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Security]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[firewall]]></category> <category><![CDATA[iptables]]></category> <category><![CDATA[linux firewall]]></category> <category><![CDATA[linux security]]></category> <category><![CDATA[network security]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=16367</guid> <description><![CDATA[Every PC needs protection. Even though the Linux operating system has a reputation for being nearly crack-proof, it is irresponsible to assume this true. Any operating system connected to a network is vulnerable in some way or other and having as much protection as you can is the only way to use a computer intelligently. [...]]]></description> <content:encoded><![CDATA[<p>Every PC needs protection. Even though the Linux operating system has a reputation for being nearly crack-proof, it is irresponsible to assume this true. Any operating system connected to a network is vulnerable in some way or other and having as much protection as you can is the only way to use a computer intelligently.</p><p>Now with the Linux operating system you have a lot of choices for protection. But one of the easiest to use is <a
title="Firestarter" href="http://www.fs-security.com/" target="_blank">Firestarter</a>. Firestarter is one of the easiest-to-use firewalls I have used. And with this simplicity does not come a sacrifice to security. Just because it&#8217;s easy does not mean it lacks protection. Firestarter is powerful and has a ton of features. In this article you will learn how to install Firestarter and set up a basic desktop firewall.</p><p><span
id="more-16367"></span><strong>Feature highlights</strong></p><p>Firestarter includes such features as:</p><ul><li><span
style="background-color: #ffffff">Setup wizard.</span></li><li><span
style="background-color: #ffffff">Real time event viewer.</span></li><li><span
style="background-color: #ffffff">Easy port forwarding.</span></li><li><span
style="background-color: #ffffff">ICMP parameter tuning.</span></li><li><span
style="background-color: #ffffff">Advanced kernel tuning.</span></li><li><span
style="background-color: #ffffff">Suitable for desktops, servers, and gateways.</span></li></ul><p>and much, much more.</p><p><strong>Installation</strong></p><p>The installation of Firestarter is simple. Because it will most likely be found in your distributions&#8217; repositories you will only need to follow these steps for installation:</p><ol><li><span
style="background-color: #ffffff">Open up your Add/Remove Software tool.</span></li><li><span
style="background-color: #ffffff">Search for &#8220;firestarter&#8221; (no quotes).</span></li><li><span
style="background-color: #ffffff">Select Firestarter for installation.</span></li><li><span
style="background-color: #ffffff">Click Apply.</span></li><li><span
style="background-color: #ffffff">Enter your user password.</span></li><li><span
style="background-color: #ffffff">Wait for the installation to complete.</span></li><li><span
style="background-color: #ffffff">Close your Add/Remove Software utility.</span></li></ol><p><strong>Running Firestarter</strong></p><div
id="attachment_16370" class="wp-caption alignleft" style="width: 431px"><a
rel="attachment wp-att-16370" href="http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/firestarter_1/"><img
class="size-full wp-image-16370 " src="http://www.ghacks.net/wp-content/uploads/2009/09/firestarter_1.png" alt="Figure 1" width="421" height="238" /></a><p
class="wp-caption-text">Figure 1</p></div><p>You will find the Firestarter executable located in the Administration sub-menu of the System menu (in GNOME). When you first run Firestarter the wizard will open up. The first screen is the usual Welcome screen so you can just click the Forward button. The first screen you will have to do any configuration with is the Network Device Setup (see Figure 1). In this screen you need to set which interface Firestarter is to listen to. I am using a laptop so I will select my wireless device.</p><div
id="attachment_16374" class="wp-caption alignright" style="width: 426px"><a
rel="attachment wp-att-16374" href="http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/firestarter_nat/"><img
class="size-full wp-image-16374 " src="http://www.ghacks.net/wp-content/uploads/2009/09/firestarter_nat.png" alt="Figure 2" width="416" height="236" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The next screen (see Figure 2) asks if you need to use internet connection sharing to set your machine up as a gateway. If you do you will need to first click the check box to enable it and then select an interface for the other machines to connect to. If you need to use your machine as a DHCP server you will have to have that installed outside of Firestarter.</p><p>Once you have taken care of connection sharing (if it is needed) click the Forward button and you&#8217;re done. The last screen wants to know if you want to start the firewall immediately and has you save your configuration.</p><div
id="attachment_16375" class="wp-caption alignleft" style="width: 282px"><a
rel="attachment wp-att-16375" href="http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/firestarter/"><img
class="size-full wp-image-16375 " src="http://www.ghacks.net/wp-content/uploads/2009/09/firestarter.png" alt="Figure 3" width="272" height="325" /></a><p
class="wp-caption-text">Figure 3</p></div><p>While Firestarter is running you will see a small icon in your notification area that looks like a blue circle with a right-pointing triangle. If you click on that it will open up the Firestarter main window (see Figure 3). From this window you can Stop the firewall, lock the firewall, view the events log, edit both your inbound and outbound policies, and monitor active connections.</p><p>In order to monitor active connections expand the Active Connections listing which will list every connection made to and from your machine. In both the Active connections section and the Events tab you can right click an entry and take action. For instance, in the Active Connections section you can right click an entry and look up the hostname of that entry. In the Events tab you can do more. If you right click an entry in the Events tab you can do the following:</p><ul><li><span
style="background-color: #ffffff">Allow connections from source.</span></li><li><span
style="background-color: #ffffff">Allow inbound service for everyone.</span></li><li><span
style="background-color: #ffffff">Allow inbound service for source.</span></li><li><span
style="background-color: #ffffff">Disable events from source.</span></li><li><span
style="background-color: #ffffff">Disable events on port.</span></li><li><span
style="background-color: #ffffff">Lookup hostnames.</span></li></ul><p>Finally, in the Policy tab, you can right click any blank area and add a rule that will apply to a connection from a host or to a port/service. When you go to add a rule you will only need enter the IP address (or domain) and then add a comment.</p><p><strong>Final thoughts</strong></p><p>Firestarter makes the often daunting task of creating a firewall for a Linux machine simple. If you have ever dealt with iptables you will understand when I say this is a huge relief for desktop users who do not want to take the time to learn to use the underlying technology.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/09/15/firestarter-simple-to-use-powerful-desktop-firewall/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> </channel> </rss>
