Donated to Google Analytics Plugin

I’ve just donated $10 for the Google Analytics Plugin, one of the better plugins for WordPress in my opinion and well worth the cash.

Posted in Personal, Wordpress | Tagged , | Leave a comment

Security enhancing your Ubuntu LAMP with Apparmor

sudo aa-genprof apache2

When you see the following message

Would you like to enable access to the
profile repository?
(E)nable Repository / (D)isable Repository / Ask Me (L)ater

Select E for enable.

You’ll see the following message

Writing updated profile for /usr/sbin/apache2.
Setting /usr/sbin/apache2 to complain mode.

Please start the application to be profiled in
another window and exercise its functionality now.

Once completed, select the “Scan” button below in
order to scan the system logs for AppArmor events.

For each AppArmor event, you will be given the
opportunity to choose whether the access should be
allowed or denied.

Profiling: /usr/sbin/apache2

[(S)can system log for SubDomain events] / (F)inish

Select Finish and you’ll see the following message

Setting /usr/sbin/apache2 to enforce mode.
Reloaded SubDomain profiles in enforce mode.
Finished generating profile for /usr/sbin/apache2.

Edit the newly created apparmor profile and add the following lines within ^DEFAULT_URI bracket

/usr/sbin/suexec2 rix,
/usr/share/apache2/** r,
/var/log/apache2/** rwl,
/var/www/** r,

Set the newly created apache2 apparmor profile to complain mode then restart apache2

sudo aa-complain /etc/apparmor.d/usr.sbin.apache2
sudo /etc/init.d/apache2 restart

After running apache for a while, we can update the apparmor profile.

sudo aa-logprof

This is my apparmor apache file, it’s pretty basic since I don’t run any php scripts just static pages. I suspect that I would certainly have more to it if I did, but it works for me. I’m currently running Ubuntu Hardy Heron.

Continue reading

Posted in Computing Tips, Linux, Personal | Tagged , , | Leave a comment

Installing free2ban on Ubuntu

First thing to do is install it from the repository, I’m making the assumption that you are already connected to the internet.

sudo apt-get install fail2ban

The default configuration is configured in the file /etc/fail2ban/jail.conf it’s suggested at the top of the file that we create a file called /etc/fail2ban/jail.local that overrides the default file, as the original file will get overwriten when the package gets upgraded over time.

Use the original file as a templace to jail.local

sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
sudo nano /etc/fail2ban/jail.local

The only service that has external exposure past my firewall is ssh, so as you can see, that is the only service that’s enabled. I’ve also ignored my own private class B network (ignoreip) since that doesn’t get routed past my home router anyway.

I’ve also changed the bantime to 6 hours, I think I’ll keep an eye on my log files for a while. Might be interesting reading (for me anyway) to see where these attempts are coming from (mostly China) is my guess so it will be good to see if my theories hold out :-)
Continue reading

Posted in Computing Tips, Linux | Tagged , | Leave a comment

Installing FreeNX on Ubuntu Lucid Lynx 10.04

I foundit pretty easy to do, the hard part was finding consistent instructions, so I blogged it to make sure I didn’t forget.

sudo add-apt-repository ppa:freenx-team
sudo apt-get update
sudo apt-get install freenx-server

You can download and install the nxclient from the nomachine website here. Just follow the instructions further down the nomachine website link.

References:

http://www.ubuntuguide.org

http://www.ubuntuforum.org

Posted in Computing Tips, Linux | Tagged , , | Leave a comment

Installing and setting up ntpd under Ubuntu

Install NTP on your home server

sudo apt-get install ntp

Bare in mind that I’m in the UK so I’m obviously I’m going to choose NTP servers that are geographically close to me.

After reading a fair bit about configuring ntp safely, what to include and what to block. My server is now serving all the machines on my home network.

My /etc/ntp.conf now looks like this, feel free to use it if you wish (I take no responsibility if it doesn’t work or isn’t correct for your network) works fine with mine though :-D

ntp.conf file below.

Continue reading

Posted in Computing Tips, Linux | Tagged , | Leave a comment