HOW TO: Secure Your Box With Bastille
January 4, 2006 on 9:40 pm | In Linux, HOW TO, Security |Bastille is a hardening tool which is very effective at locking down your system, and all it requires is a few minutes of your time! It is currently available for the major Linux distributions: SUSE, Mandrake (the available RPM should work with Mandriva), Fedora Core, Red Hat, Debian, and Gentoo, and it is also available for HP-UX and Mac OS X, as well as the source code which can be compiled on most *nix systems. In this tutorial I shall take you through the steps of installing it and setting it up properly in order to secure your system better than before. Please note that this tutorial is designed for users new to Linux, and so may be slightly cumbersome for the more advanced users out there.
First of all, we’ll install it. As my demonstration system I am using a laptop running Fedora Core 3, and I am installing Bastille version 3.0.8. You may use the method described on Bastille’s site to install it if you have a different distro or Operating System to mine. Here is how I installed it:
- Download the Bastille RPM - which will work for Red Hat, Fedora Core, SUSE, or Mandrake. Install it onto your system, either by using the inbuilt package manager or the following commands in console:
$ su
Password:
# rpm -ivh Bastille-3.0.8-1.0.noarch.rpm - Now, download perl-Curses (although non-graphical, at the end of the day it tends to cause fewer problems than installing perl-Tk). Choose the correct one for your distro and release at the module table. Install it the same way you installed Bastille in part 1.
- Once you have installed both of these, fire up Bastille’s configuration in the console by typing the following command (still as root):
# bastille -c
Note: If that doesn’t work, type the following into the console:PATH=/usr/sbin:$PATH- then try to run Bastille again, and it should work.
A word of advice: I may tell you to just ‘Press “Next”‘ or ‘Hit “Yes”‘ in some places, but you should read the text to make sure you understand what you are configuring and that the choice I am leading you to is the right one.
Having started up Bastille, some lines of text should appear on your screen.
- Press Ctrl + C and it will scroll to the end of the text, as shown below:
- Type “accept” and press Enter. Now you will be taken to Bastille’s configuration, and introduced to the program. Press “Next” to continue.
- At this first question you may want to press “No”, for if not simple commands like ‘ifconfig’ and ‘runlevel’ will be disabled to all users but root (and I personally use them quite a lot) - although hitting “Yes” is the more secure option.
- Press “Next”.
- Press “No”, because if not you will be unable to mount and unmount devices after boot (unless you are root).
- At the next screen, hit “Yes”.
- Once again, press “Yes”.
- Press “Yes” at the ‘r-tools’ question.
- And “Yes” at the ‘usernetctl’ one.
- “Yes” again, to leave traceroute available to all users.
- “Yes” to disable r-protocols.
- At this screen, it is a good idea to press “Yes” - this will get you into the good habit of renewing your password every 60 days.
- Press “Yes” to set the default umask.
- Here, leaving 077 is a good idea - it means that no other users on your system can read or write to your files (of course, this is your choice). When you’re happy, hit Tab and then “Next”.
- I have decided to set this one as “Yes”, because if you need to become root on the other tty’s then you can just ’su’ from a normal user’s account.
- “No” at password-securing the GRUB prompt, because this isn’t necessary unless you’re scared a cracker may be able to access your computer physically.
- It’s also fine to choose “No” at this one.
- Hitting “Yes” here is a good option.
- Leave the following one as “No”.
- For a bit of ‘fun’, leave this one as “Yes”.
- Press Tab at this screen.
- Type in your name here, and then press Tab and hit “Next”.
- If you’re running a server you may want to set this one as “Yes”, but otherwise leave it as the default “No”.
- Choose “No” here unless the computer is a public one and you want to restrict console access to some users.
- Also choose “No” here - if not you will end up with some pretty large logs.
- This screen is another informative one, so just hit “Next”.
- As my computer is a laptop, I chose “No” here. But, if you’re using a desktop, press “Yes”.
- Press “No” here if you are on a Local Area Network (LAN) and connect to other computers regularly.
- Again, if you are using a laptop you’ll probably want to press “No”. Otherwise, “Yes” is fine.
- GPM is fairly useless unless you do not like using the keyboard to move around in console, so hit “Yes” here unless you really do want it.
- If you have a Hewlett-Packard all-in-one scanner/fax/printer, then choose “No”. Otherwise choose “Yes”. (Most of you should not see this screen).
- Unless you connect to the internet via ISDN, choose “Yes”.
- Choose “Yes” here to deactivate ‘kudzu’. (Most of you should not see this screen)
- Hit “Yes” to stop sendmail running in daemon mode.
- Another info screen - press “Next”.
- I advise you press “No” here to keep printing enabled.
- Hit “No” not to install the TMPDIR/TMP scripts.
- Then, press “Yes” to run the packet filtering script. Here is where we shall configure the firewall.
- Hit “Next”.
- Hit “No” (unless your computer is acting as a gateway to the internet, and you plan to have a LAN behind it).
- Remove the text and hit “Next”.
- Hit “Next”.
- Hit “Next”.
- Hit “Next”.
- Type in “echo-request” and hit “Next”.
- Hit “Next”.
- Hit “Next”.
- Press “No” (to keep things simple).
- Hit “Next”.
- Hit “Next”.
- Hit “Next”.
- Press “Yes”.
- Hit “Next”.
- Type in your network interfaces (’eth0 ppp0′ are the likely ones) and press “Next” - this shouldn’t matter if you’re running kernel 2.4+
- Hit “Next”.
- Hit “Next”.
- Press “Yes”.
- PSAD is not necessary, but if you’re security-conscious you might want to set it up to log any suspicious (possible) crack attempts. I will cover it anyway - so, if you would like to set it up, hit “Yes”. Otherwise, choose “No” (in that case, skip to #70).
- Hit “Next”.
- Hit “Next”.
- Press “No”.
- Hit “Next”.
- Press “No”.
- Leave the default values and hit “Next”.
- Type in your email address (to which any security alerts will be reported) and hit “Next”.
- Hit “Next”.
- Press “Yes”.
- Press “No”.
- Press “Yes”.
- Finally, press “Yes”!
You have now finished installing Bastille - an array of daemons have ceased to run, and your system is now more secure. Tedious, but worthwhile in the long run!
Please leave a comment below or contact me if you have a problem.
Online certifications are for those professionals who want to recognize their skills and authentication in a field of their specific specialization. All professionals chose some best quality transcender help to get through the typical online exams like comptia a+ and Microsoft’s mcse certification exams. Cisco have little different scene, ccna certification needs proper study knowledge and concepts of multi layer model of networks while itil certification required handsome study approach to pass the exam.
17 Comments »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by WordPress with Pool theme.
Entries and comments feeds.
Valid XHTML and CSS. ^Top^
0.369 seconds.
Credit - Refinance - Personal Loan - Debt Help









































































[…] A must-have security application, along with Bastille Linux! // Used for showing and hiding user information in the comment form function ShowUtils() { document.getElementById(”authorinfo”).style.display = “”; document.getElementById(”showinfo”).style.display = “none”; document.getElementById(”hideinfo”).style.display = “”; } function HideUtils() { document.getElementById(”authorinfo”).style.display = “none”; document.getElementById(”showinfo”).style.display = “”; document.getElementById(”hideinfo”).style.display = “none”; } […]
Pingback by AppArmor Turns Open Source at J_K9 @ Linux — January 15, 2006 #
WordPress 1.5.2
Using
Bastille may ‘harden’ your Linux, but, is (unnecessarily?) tedious.
I think I’ll opt for having a root canal done first.
Comment by Root Canal — January 26, 2006 #
Mozilla Firefox 1.5 on
Linux
Using
It may be tedious, but is an added security bonus in the long run - especially if you’re on a direct connection to the internet or connect to public WAN’s. Nothing in the security world is meant to be quick or easy - if it is, it probably isn’t secure enough.
And with Linux’s increasing popularity will come more people trying to break into it - it’s always best to be prepared.
Comment by J_K9 — January 26, 2006 #
Mozilla Firefox 1.5 on
Windows XP
Using
[…] HOW TO: Secure Your Box With Bastille (tags: howto Linux security) […]
Pingback by Drugi dom » Blog Archive » links for 2006-01-26 — January 26, 2006 #
WordPress MU
Using
Just two questions:
1. Since I’ve installed Bastille, I can’t download torrent files (only upload). How can I fix this?
2. How can I remove Bastille from my Fedora 4?
Can you help me? Thank you.
Comment by David — February 4, 2006 #
Mozilla Firefox 1.5 on
Fedora Linux
Using
David - I am not sure why it has locked up your BitTorrent uploads. Are you sure it is not your BitTorrent app? Try using another application, or if not you may have to allow the port again…
To remove Bastille, do the following:
# rpm -e Bastille(as root)Comment by J_K9 — February 5, 2006 #
Mozilla Firefox 1.5.0.1 on
Windows XP
Using
It was a problem with my ISP because now everything is ok.
Firstly, I thought the problem was caused by Bastille because 1 or 2 minutes after it installation, I losted all my BitTorrent download speeds. People who use this ISP also reported the same case at the same hour.
Thank you again and nice guide.
Comment by David — February 5, 2006 #
Mozilla Firefox 1.5 on
Fedora Linux
Using
David - No problem, and I’m glad it’s resolved!
Comment by J_K9 — February 12, 2006 #
Mozilla Firefox 1.5.0.1 on
Windows XP
Using
When Bastille firewall will be available on Fedora 5?
Comment by Evgeny — April 4, 2006 #
Mozilla Firefox 1.5.0.1 on
Fedora Linux
Using
[…] Continue reading HOW TO: Secure Your Box With Bastille howto security software tutorial […]
Pingback by SigmaLab » Blog Archive » HOWTO: Secure Your Box With Bastille — December 4, 2006 #
WordPress 2.0.5
Using
Just want to say thanks!
Comment by Acura Lens — February 24, 2007 #
Internet Explorer 6.0 on
Windows XP
Using
Online pharmacy gt buy nexium….
Buy nexium medication from online pharmacy. Online pharmacy gt buy nexium. Buy nexium in canada….
Trackback by Buy nexium online pharmacy. — February 2, 2008 #
Using Unknown browser
Zoloft withdrawals….
Generic zoloft. Side effects of zoloft….
Trackback by Zoloft dosing. — February 9, 2008 #
Using Unknown browser
free instant credit check…
generation hoisted fortune …
Trackback by free instant credit check — February 9, 2008 #
Internet Explorer 6.0 on
Windows XP
Using
Tramadol….
Tramadol….
Trackback by Tramadol. — July 16, 2008 #
Using Unknown browser
piggs peak casino bonus code…
lager:Saturnalia,periscope lightens,bristle?…
Trackback by piggs peak casino bonus code — July 19, 2008 #
Internet Explorer 4.01 on
Windows 95
Using
where can i find pocher to play for free…
benefactors containable?synthesizer biennium appointive reclaimers …
Trackback by where can i find pocher to play for free — October 2, 2008 #
Internet Explorer 5.0 on
Mac OS
Using