How to Hide Apache2 and PHP version without using mod_security in Ubuntu Linux

Although security by obscurity is not the best policy to protect your IS assets, but it is still useful to thwarts simple network scanner or newbie crackers.

Note: This tip is written for Ubuntu Linux, the steps is similar to other GNU/Linux distro, albeit with a slight variant.

Hiding Apache2 version
Edit /etc/apache2/apache2.conf

Add these lines at the end of the file:
ServerSignature Off
ServerTokens Prod

Restart Apache2
[bash]
sudo /etc/init.d/apache2 restart
[/bash]

Hiding PHP version
Edit /etc/php5/apache2/php.ini file

Find these lines, and switch it off:
expose_php = Off
display_errors = Off

Additionally you may disable certain ‘risky’ functions in php by editing the disable_functions line:
disable_functions = phpinfo, system,show_source,

Finally, you may restart Apache2 web server.
[bash]
sudo /etc/init.d/apache2 restart
[/bash]

PPSPPA (Sisa Pepejal) goverment agency uses Ubuntu in its office branches

PPSPPA or Perbandanan Pengurusan Sisa Pepejal dan Pembersihan Awam is a government agency in Malaysia that uses Ubuntu in its offices. PPSPPA has branches in every state in the Peninsular, including the HQ and training center in Putrajaya, all of it runs Ubuntu 10.04 LTS operating system.

PPSPPA Logo Sisa Pepejal

As such, PPSPPA only uses hardware which runs in Ubuntu, including printers, scanners and drawing tablets. Which is a good sign for vendors to start releasing their hardware drivers for open source operating systems.

Hopefully other government agency would follow suit and use free and open source operating system instead the one that requires millions RM of site license. It is not the license that concerns us, but it is the grip of monopoly of a single corporation has over governments and economy that is most concerning.

Limiting the number of connections to SSH Server using Iptables

This is the quickest way to limit the number of connection to your SSH server with iptables.

[bash]
sudo /sbin/iptables -A INPUT -p tcp –syn –dport 22 -m connlimit –connlimit-above 5 -j REJECT
[/bash]

This will only allow up to 5 concurrent connections to the SSH server, subsequent connections will be rejected by iptables, thus this can thwarts Brute-force attempts to your server.

More Articles About Securing SSH Server

Dell Inspiron Duo Tablet Notebook Running Ubuntu (with Ubermix)

The video shows how cool Dell Inspiron Duo is when running Ubuntu.

This particular demo uses Ubuntu 10.10 (Maverick Meerkat) with Ubermix customization, which contains a collection of application suitable for netbook users.

Ubermix can be downloaded from its official website, please check the Netbook/table model specific instructions for proper installations.

Supported Netbooks

  • Dell Inspiron DUO iD-4495FNT Laptop
  • ASUS EEEPC 900 BK090XNetbooks)
  • ASUS Eee PC 1015PX
  • Dell Inspiron Mini 1018
  •  

    How to extract Audio from Youtube Flash Video (FLV) in Ubuntu Linux

    First you need youtube-dl tool or ‘cclive’ to download the Youtube .FLV file.

    Then, download the Youtube stream.
    python youtube-dl http://www.youtube.com/watch?v=lee7a55401e

    Alternatively, you can use ‘cclive’ to download the youtube stream.
    cclive http://www.youtube.com/watch?v=lee7a55401e

    After that, use ffmpeg to extract the audio and encode it to MP3
    ffmpeg -i lee7a55401e.flv vn -acodec libmp3lame -ab 128000 -ar 44100 lee7a55401e.mp3

    Note: You need to install the restricted codecs in order to extract MP3 audio files.

    Thanks Mohammad Bahathir Hashim for the tip!