man -t passwd | ps2pdf -> passwd.pdf
Tags: ps2pdf
Posted by Hans-Henry Jakobsen
This post describes how you can setup secure web browsing using Firefox3 and by setting up a SSH tunnel from your PC/host to a remote PC/host. Your PC will then act as a local SOCKS proxy and all applications that supports SOCKS5 interface to this port. This is a handy solution if you are on a untrusted net like a wireless connection. The solution can also be used in Thunderbird if you would like.
Note
It is important to note that it’s only the connection between your host and the remote host that is secure. It is also important to note that Firefox will do DNS queries to the untrusted netwoork. This can be fixed by opening the about:config page and change network.proxy.socks_remote_dns to true.
Start a SSH connection to a host that you want to proxy through. Use the -D option to specify a SOCKS5 port on your localhost. The port doesn’t really matter. Just make sure you use the same port in your SOCKS client application.
# ssh -D 3333 username@example.com
In Firefox select “Tools | Options… | Advanced | Network |Settings… button”.

Then select “Manual proxy configuration”. All you need to fill out is “SOCKS Host: Localhost”, “Port: 3333″, then select “SOCKS v5″.

Type in “localhost” in the SOCKS host field and press the OK button.
You are now ready to surf using Firefox3 and SOCKS5 througt a SSH tunnel.
You can also use Putty if you are a Windows user. The configuration is then as follows:

Tags: firefox3, putty, SOCKS5, ssh
Posted by Hans-Henry Jakobsen
This is a short post on how you can “share” a bash session/prompt with other users.
# screen
:multiuser on
# screen -x
Serveral users can connect and share the same session at once.
To close the screen session just use the key combination <Ctrl + a>
Posted by Hans-Henry Jakobsen
You can enable boolog in /etc/default/bootlogd
BOOTLOGD_ENABLE=Yes
The log is saved in /var/log/boot
This tip also applies to Ubuntu systems.
Posted by Hans-Henry Jakobsen
Vlogger is a program that handles large amounts of virtualhost logs and splits it to separate files.
This is a short HOWTO to configure it using Apache.
# aptitude install vlogger
Make sure you have working Apache server
Change the LogFormat line (there are multiple LogFormat lines – in this example we will change the one that is named combined) in /etc/apache2/apache2.conf. We must add the string %v at the beginning of it
vi /etc/apache2/apache2.conf
#LogFormat “%h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined
LogFormat “%v %h %l %u %t \”%r\” %>s %b \”%{Referer}i\” \”%{User-Agent}i\”" combined
Add the following CustomLog line to the same file (you can put it directly after the LogFormat line)
vi /etc/apache2/apache2.conf CustomLog “| /usr/sbin/vlogger -s access.log /var/log/apache2″ combined
NOTE
We only need one CustomLog directive in our whole Apache configuration. Please disable all other CustomLog directives, especially in your virtual host configurations.
Restart apache
# /etc/init.d/apache2 restart
Vlogger will now create subdirectories in the /var/log/apache2 directory, one per virtual host, and create access logs that contain the current date in the file name. It will also create a symlink called access.log that points to the current log file.
Let’s assume we have two virtual hosts, www.example1.com and www.example2.com. Then this is how the /var/log/apache2 directory will look like:
# ls /var/log/apache2/ www.example1.com/ 09022008-access.log 09012008-access.log access.log -> 09022008-access.log www.example2.com/ 09022008-access.log 09012008-access.log access.log -> 09022008-access.log
Posted by Hans-Henry Jakobsen