Archive for the ‘Basics’ Category
Use separate configurations by network in the Windows 7 firewall
The Windows 7 Firewall allows separate configurations by network. This feature makes it possible to configure different firewall rules for the home network , the networkwork or a public network and Windows will apply these rules automatically when the computer gets connected to a different network. To configure the firewall by network, click on Start > Control Panel > System and Security > Windows Firewall
Then Click on “Allow a program or feature trough Windows Firewall” to get the list of open firewall ports for all configured networks.
If the application that shall be able to connect to a specific network is listed there, then allow access by enabling the checkbox in the column of the network. If the application is not in the list, click on “Allow another program” and then select the program in the list that pops up.
How to compress email attachments automatically in Mozilla Thunderbird
There is a handy Thunderbird extension named “Auto zip” available that compresses email attachments as .zip files automatically, So you dont have to compress the files manually anymore before you attach them to the email.
Thunderbird extension download:
https://addons.mozilla.org/en/thunderbird/addon/4003
Sadly, the official version of the plugin works only for thunderbird 2. But a few users offer already patched versions for Thunderbird 3 (see links in the comments). Please be aware that using such a patched version has the risk that it might contain malicious code.)
https://addons.mozilla.org/de/thunderbird/reviews/display/4003
How to block access to a server by IP address on Linux
Sometimes you might want to block connects to your server by IP address. E.g. when someone tries to attack your system. This can be done in several different ways, e.g. with iptables (firewall) rules or by setting up a reject route. Using iptables sometimes causes conflicts with installed firewalls so that I will use the route command here. The command is:
/sbin/route add -host 192.168.0.123 reject
Replace 192.168.0.123 with the IP address that you want to block and execute the command as root user on the shell.
How to enable the new multisite feature in WordPress 3.0
If you recently updated to or installed WordPress 3.0, you might wonder where the menu for Multisite feature is. By default, these new functions are disabled after a WordPress update, to enable them, edit the file wp-config.php and add the line
define(‘WP_ALLOW_MULTISITE’, true);
On your next login, you will see a new menu labeled “Super Admin” which contains the functions to add new sites to wordpress.
Get a list of all virtual hosts which are defined in all apache configuration files
Have you ever searched where the virtual host of a website is defined in the apache config files? There is a handy option of the apache2ctl script which might help then. When you run the command:
apache2ctl -S
on the shell, you will get a list of all virtual hosts and default servers incl. the line number where it is defined. Example:
~# apache2ctl -S VirtualHost configuration: wildcard NameVirtualHosts and _default_ servers: *:8080 is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10) port 8080 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-ispconfig.vhost:10) *:8081 is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10) port 8081 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-apps.vhost:10) *:80 is a NameVirtualHost default server ispconfig.local (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost ispconfig.local (/etc/apache2/sites-enabled/000-default:1) port 80 namevhost example.com (/etc/apache2/sites-enabled/example.com.vhost:7) Syntax OK
Thanks to Planetfox for this tipp.
How to remove old java versions from Windows
When you install the latest java runtime enviroment, it gets installed beside your existing java installation. With every java update, more space is used on the harddisk. To remove old java versions, there is a tool named JavaRa which can be downloaded here:
https://sourceforge.net/projects/javara/files/javara/JavaRa/JavaRa.zip/download
Unpack the JavaRa.zip file and double click on the JavaRa.exe to start JavaRa. Select the language:
and click on “Remove older versions”.
How to convert RPM software packages to Debian (.deb)
Maybe you had this problem already: you use Debian or Ubuntu Linux and a software package that you like to install is only available in RPM format. The solution is a handy tool called alien, which converts .rpm files to .deb. Installing alien:
apt-get install alien
Converting a rpm package to debian format:
alien --to-deb /tmp/mysoftwarefile.rpm
Conversions from .deb to rpm are also possible:
alien --to-rpm /tmp/mysoftwarefile.deb
Rerun the last command with sudo on the Linux shell
Have you ever executed a command on the shell and noticed the that you had to run it with sudo? Instead of typing the command again with “sudo” in front of it, just run:
sudo !!
which will execute the command that was run before with sudo. Thanks to Planetfox for this tipp.
How to kill processes in “D” state in Linux?
If a process is shown with process state “D” in tools like ps or top, then its a zombie process. Example:
ps axl | grep D F UID PID PPID PRI NI VSZ RSS WCHAN STAT TTY TIME COMMAND 4 104 2579 9109 20 0 5024 2116 refrig D ? 0:00 cleanup -z -t unix -u -c
Zombie processes can not be killed with the normal commands like “kill -9 PID”, you will have to reboot the system to kill them.
How to use apt-file to find which .deb package contains a specific file
Sometimes you need to know which debian package contains a specific file e.g. because you deleted a system file accidently or you try to install a new software that requires this file. The apt package management utility which is used in Debian and Ubuntu comes with a handy tool called apt-file which allows a saerch for filenames in the package database.
Install apt-file
apt-get install apt-file
Update the apt-file database
apt-file update
Search for a specific file name, e.g. “lcrypto”
apt-file search /bin/bash
apt-file search /bin/bash bash: /bin/bash bash: /usr/bin/bashbug bash-minimal: /bin/bash-minimal bash-static: /bin/bash-static bashdb: /usr/bin/bashdb mybashburn: /usr/bin/bashburn



