Friday, August 28, 2009

Set the system time in Linux

It is always a good idea to verify that the date and time are set correct on a computer system. Otherwise all of your logs will have the wrong time on them, for example. You can check the current system time by running the date command without any arguments, like so:
$ date
This will give you an output that looks something like this:
Fri Aug 28 10:53:48 EDT 2009
If the date is set incorrect, you can change it by running the date command as root with the new date and time as in argument. It will follow this format:
# date mmddhhmmyyyy.ss
For example, to set the date and time as August 28, 2009 at 10:53:48, you would type this:
# date 082810532009.48
If the year or seconds are correct you can leave off either or both of them. Also, keep in mind that this uses a 24 hour clock. So, if you wanted to set the date to August 28 at 1:00pm but didn't care about setting the seconds and the year was correct, you would type this:
# date 08281300

Thursday, August 27, 2009

Configure iptables in Debian and Ubuntu

Iptables is the classic firewall for Linux systems. Iptables is very flexible and very powerful, but it not known for being terribly user friendly. This is partly the reason that Ubuntu ships with ufw, a simplified and much easer to use interface for iptables. Ufw, however, is not as powerful as iptables and the number of rules it can handle is limited.

I have updated the iptables setup script on my website to reflect the necessary configuration steps for use with Debian and Ubuntu. Additionally, this updated script contains some new features compliments of my friend Phil including optional integration with a perl script that blocks connections from a known blacklist and rules to help defend against DoS attacks, block ping requests, and prevent brute force attacks over SSH.

Here is a link to my downloads page where you can find the new script: http://www.zloether.com/downloads

Tuesday, August 11, 2009

Install Firefox 3.5 in Ubuntu with Ubuntuzilla

Mozilla released Firefox 3.5 a few weeks back and unfortunately, the latest version is still not in the Ubuntu repositories. There is a prerelease beta available while the latest version as of this writing is 3.5.2. Luckily, however, there exists Ubuntuzilla, a program written in Python that will download, install, and update three of Mozilla's most popular programs: Firefox, Thunderbird, and SeaMonkey.

To install Ubuntuzilla, run this command:
$ wget http://sourceforge.net/projects/ubuntuzilla/files/latest
This will download a .deb installer package. Now to install it:
$ sudo dpkg -i ubuntuzilla-*.deb
To install Firefox 3.5, just run Ubuntuzilla by itself and without any options:
$ ubuntuzilla.py
Now just follow the instructions on the screen (they're really straightforward) and when you finish you will have the latest stable version of Firefox installed.

Tuesday, August 4, 2009

Enable SSH in Untangle

The default installation of Untangle includes an SSH server but it is not turned on by default. Enabling it is easy enough, though. First you will need have physical access to the Untangle machine. Launch the Terminal. If this is the first time you have launched the Terminal, you will be prompted to enter a new password. This is the password for the root user. Once you are looking at a prompt, enter these two commands:
# mv /etc/ssh/sshd_not_to_be_run /etc/ssh/sshd_not_to_be_run.orig
# /etc/init.d/ssh start
The first command renames an empty file that will prevent the SSH server from running if it is present. The second command starts the SSH server. You can test that whether it is working correctly by running this command:
# ssh localhost
If you see a prompt asking for a password then it worked.

Sunday, August 2, 2009

Updated .bashrc

I have updated my bashrc file yet again. This update was mostly bug fixes and minor improvements from the last version that I posted. Check my website's downloads page for the latest version.