A chronological documentation test project, nothing serious, really!

29 Feb 2008 Configure squid to ignore some sites

If you are using squid like me, it is sometimes useful to avoid cacheing some internet addresses. To accomplish this you could edit your /etc/squid/squid.conf file and add the following line

acl NOCACHEDOMAIN dstdomain
no_cache deny NOCACHEDOMAIN

This makes it possible to view without viewing a squid cached page.


Posted by

27 Feb 2008 rpcbind and auth ports open

The last time I installed Debian Etch i closed both port 111 and 113 but since I’ve forgot it already and a new installation is in progress, this post should remind me how to do it in the future. The code view below shows the ports nmap found were in a open state

111/tcp open  rpcbind
113/tcp open  auth

Port 113/auth can be closed by commenting out the ident line in the /etc/inetd.conf

#ident          stream  tcp     wait    identd  /usr/sbin/identd        identd

Port 111 is the portmap daemon and can be configured to only listen on the loopback interface

dpkg-reconfigure portmap

This command modifies the /etc/default/portmap file and adds/uncomments the line


Tags: , , , ,

Posted by

26 Feb 2008 List rpm package content

To list the contents of a package just run the command

# rpm -ql packagename


# rpm -ql nmap


Tags: , , ,

Posted by

25 Feb 2008 My 10 most used linux commands

This is a oneliner bash command to determine my 10 most used linux commands according to my history file

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10

The result

     1  188  37.6%  vi
     2  38   7.6%   ls
     3  24   4.8%   cat
     4  22   4.4%   apt-get
     5  12   2.4%   date
     6  11   2.2%   tail
     7  11   2.2%   cd
     8  10   2%     rm
     9  10   2%     man
    10  9    1.8%   basename

It looks like i use vim a lot on my home server. You should try it yourself and see what commands you use the most.


Tags: , , , , , ,

Posted by

25 Feb 2008 Discover online PCs fast

This is as far as I know the fastest way to determine what PCs are online in your network

# nmap -sP

Starting Nmap 4.53 ( ) at 2008-02-25 00:01 CET
Host appears to be up.
Host appears to be up.
Host appears to be up.
Nmap done: 255 IP addresses (3 host up) scanned in 5.711 seconds

It only took 5.7 seconds to scan all 255 IP addresses and determine if they were online.

Posted by