20/02/2009
Suppose that you want to access a remote port in a machine that runs a service on port 3306. Also suppose that the remote machine has restricted access to that port only for requests coming from the host “localhost”. You will have to create a tunnel to that machine and tunnel all your requests from you local computer’s port e.g. 2000 to the remote host’s port 3306.
ssh -L 2000:localhost:3306 root@asteriosk.gr
After doing this, every request to localhost:2000 will be redirected(tunneled) to the remote machine at port [...] Continue Reading…
20/02/2009
Yesterday, I was trying to login to my machine and I got the following message:
PTY allocation request failed on channel 0
My prompt was stuck and I could not enter commands. This happened because -for some reason- the tty related devices(/dev/ptmx, /dev/pts) were not created or mounted on my machine. In order to get this problem resolved, I created and mounted the missing devices using the following commands:
rm -rf /dev/ptmx
mknod /dev/ptmx c 5 2
chmod 666 /dev/ptmx
umount /dev/pts
rm -rf /dev/pts
mkdir /dev/pts
mount /dev/pts
In order to be able to execute commands you will [...] Continue Reading…
19/02/2009
Trying to get WP Super Cache & Wordpress working on my fast lighttpd server, I came into problems, mainly because of lighttpd’s lack of (Apache’s version of) the mod_rewrite module. The static files that were created from the cache were not statically served from wordpress. The problem is that in order to use them, the PHP fcgi was called for each request. So, why would we have to call PHP every time that a file can be completely statically provided by the web server?Following this guideI came up with [...] Continue Reading…
15/02/2009
Exclude host 10.16.21.206 from sniffing AND resolve hostnames
tethereal -N n -f 'host not 10.16.21.206'
15/02/2009
Getting the dependencies of a file:
rpm -q --requires -p package.rpm
Formating the query result of RPM database
rpm -qa –queryformat '["_%{NAME}",list("%{VERSION}-%{RELEASE}","%{ARCH}"),\n]'
Result:
“_openssh”,list(”3.6.1p2-33.30.6″,”i386″),
“_XFree86-Mesa-libGLU”,list(”4.3.0-97.EL”,”i386″),
…
Display a file-per-package list
rpm -qa --queryformat '[%{NAME}\t%{FILENAMES}\n]'
Result:
[code=bash]
kernel-smp /lib/modules/2.6.9-67.0.20.ELsmp/kernel/sound/pci/snd-atiixp-modem.ko
kernel-smp /lib/modules/2.6.9-67.0.20.ELsmp/kernel/sound/pci/snd-atiixp.ko
kernel-smp /lib/modules/2.6.9-67.0.20.ELsmp/kernel/sound/pci/snd-azt3328.ko
kernel-smp /lib/modules/2.6.9-67.0.20.ELsmp/kernel/sound/pci/snd-bt87x.ko
kernel-smp [...] Continue Reading...