npIX crosses 400 Mbps

npIX has crossed 400 Mbps mark in the last few days, I’m looking forward to the next milestone already. It is mostly driven by  the availability of Google Cache service hosted by Nepal Telecom. Also, the gradual growth of other local contents is also happening.

Now that some international content has becoming local, we are glad to “keep local traffic local”.

Mac OS X maintenance scripts

If you do not keep your computer turned on during nights, it is likely that all the maintenance scripts have not run properly. To manually run those cleanup scripts, open Terminal and type the following:

$ sudo periodic daily weekly monthly

Type your Admin password when prompted. The scripts will run in sequence but no feedbacks will be given. When each of those scripts run, they will write to their logs and you can check those log files to know when they were last run.

$ ls -al /var/log/*.out
-rw-r--r-- 1 root wheel 574968 Jul 31 08:24 /var/log/daily.out
-rw-r--r-- 1 root wheel 2343 Jul 31 08:25 /var/log/monthly.out
-rw-r--r-- 1 root wheel 5077 Jul 31 08:24 /var/log/weekly.out

In this example, all three scripts last ran on 31st July.

Repair MBR from linux

Use install-mbr to overwrite the MBR:

install-mbr -i n -p D -t 0 /dev/sde
Repalce sde with proper device letter. The options are:

-i interrupt (n=none/do not display a MBR prompt)
-p partition (D=boot the partition which has bootable flag set)
-t timeout (0=do not wait before boot)

More on manpage: http://xgen.iit.edu/cgi-bin/man/man2html?install-mbr+8

Messing with iptables connection tracking

iptables -A FORWARD -m recent --name badguy --rcheck --seconds
60 -j DROP

 
iptables -A FORWARD -p tcp -i eth0 --dport 139 -m recent --name
badguy --set -j DROP

Steve’s ipt_recent website (http://snowman.net/projects/ipt_recent/)
also has some examples of usage.

/proc/net/ipt_recent/* are the current lists of addresses and informa‐
tion about each entry of each list.

Each file in /proc/net/ipt_recent/ can be read from to see the current
list or written two using the following commands to modify the list:

echo +addr >/proc/net/ipt_recent/DEFAULT
to add addr to the DEFAULT list

echo -addr >/proc/net/ipt_recent/DEFAULT
to remove addr from the DEFAULT list

echo / >/proc/net/ipt_recent/DEFAULT
to flush the DEFAULT list (remove all entries).

Hide Apache Server Signature

To hide the detailed information about your Apache web server, OS and plugins, you disable the ServerSignature directive by modifying your Apache configuration file:

On CentOS
vi /etc/httpd/conf/httpd.conf

On Ubuntu
vi /etc/apache2/apache2.conf

Search for ServerSignature and change it to off
ServerSignature Off

Save the config and reload Apache to apply the change:

On CentOS
service httpd reload

On Ubuntu
/etc/init.d/apache2 reload