Posts Tagged ‘Network’

Running squid as user on Debian

August 20, 2007 Leave a comment

Install the required packages:

$ sudo apt-get install squid3 apache2-utils fakeroot

Create then $HOME/.squid3/squid.conf file:

cache_dir ufs @HOME@/.squid3/cache 100 16 256
auth_param basic program /usr/lib/squid3/ncsa_auth @HOME@/.squid3/passwd
auth_param basic children 1
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
cache_log @HOME@/.squid3/cache.log
access_log @HOME@/.squid3/access.log
cache_store_log @HOME@/.squid3/store.log
cache_swap_log @HOME@/.squid3/swap.log
pid_filename @HOME@/.squid3/pid

Replace @HOME@ by your home directory, don’t use $HOME. Add what you want from /etc/squid/squid.conf or

Create a password file:

$ htpasswd -c $HOME/.squid3/passwd $USER

The first time you run squid you must create cache directories:

$ fakeroot /usr/sbin/squid3 -f $HOME/.squid3/squid.conf -z

To run it normally just do:

$ fakeroot /usr/sbin/squid3 -f $HOME/.squid3/squid.conf -NX -d 99

Tags: , ,

hostname and nfsboot

August 9, 2007 Leave a comment

Here is the script I use to set the host name of a nfsboot client. On Debian it should be set as /etc/init.d/

#! /bin/sh -x

IP=$(ifconfig $ETH | head -n2 | tail -n1 | sed 's/:/ /g' | awk '{ print $3 }')
HN=$(cat /etc/hosts | grep $IP | awk '{ print $2 }')
hostname $HN

If hostname is not propertly set one symptom is that rpc.statd doe’s not start (see man rpc.statd, -n option, to know why).


I’ve lost knetstats

June 27, 2007 Leave a comment

It’s hard to track where it goes, but I finally succeeded:

I guess it won’t be available in KDE4. I hope there will be a nice alternative.


ssh and https on port 443 in the same time

May 4, 2007 4 comments

It’s possible thanks to this Martin Renold wonderful hack

Read more…


time over http (new version)

October 10, 2006 Leave a comment

A new version of my time over http script (previous version was here).

#! /bin/shmyTime=`wget -O - \    | html2text -nobs | sed 's/_/ /g' | sed 's/,//g' | sed 's/at//g'`

echo current date is `date`

date `date -d "$myTime" +%m%d%H%M.%S`

hwclock --systohc --directisa