Sunday, April 23, 2006

Firewall upgrade

I had upgraded my Nortel Contivity router with its latest firmware and all of a sudden traffic seemed to reach only my ISP's gateway but not beyond.Initially I thought it was the ISP's issue but then they confirmed that there was no issue on their side.I had a look at my routing table and the default gateway was set to the next hop of one of our serial links .But in my configuration for the router I had not configured it like that anywhere .The ISP gateway was in the same subnet as my public ip so that was the reason why their gateway was reachable but not the other destinations.I searched through the static route entries and the default gateway specifications and saw a new check box to verify public default route .I checked it and then refreshed the routing table.That did not help.
Next I thought of checking out the interface config of the serial links and there stood a new check box for default route .It was not there in the older version of the GUI for the firewall. It caused that interface to be the default route and hence the other entry where I had specified the public default route was not being effective.Well I unchecked it and things started working fine.

A few but very simple ones

Check out this one
cp /etc/httpd/conf/httpd.conf {,.bak}
would substitute
cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.bak
Now that's a pretty simple one right ?

To see the details about a file - i.e. its access time , size , blocks , inode etc..
stat filename

A cool link from Stanford University
Here's a pretty impressive collection of network monitoring tools for any network admin
http://www.slac.stanford.edu/xorg/nmtf/nmtf-tools.html

Wednesday, April 05, 2006

A few new tips

To identify if the processor is 32 bit or 64 bit ( I guess the OS will also have to be corresponding)
use uname -i or getconf LONG_BIT

To identify processes using files or sockets (will come handy esp when you are unable to unmount disks)
fuser port/type eg fuser 21/tcp will give the process ids using ftp on your machine
fuser -km /home kills all processes accessing the file system /home in any way.
Alternatively you could also use lsof and then pipe it to grep to find the file or process you are looking for

To print real and effective UIDs and GIDs of a user use
id username

In case you get these errors for yum while attempting multiple mirrors
[Errno -1] Metadata file does not match checksum
give
yum clean metadata
and if that doesn't work then give
yum clean all
then try again

To know the exit status of the last process executed
echo $?