Linux

Linux routing magic

Suppose you’re setting up a test environment, and you want a server to be able to handle some improbably large number of IP addresses, like a /16 or even larger. You could just write a script to add them all one at a time, or you could use this little shortcut and add the entire […]

Read More
Scripting

Generering av SSL sertificat

Dovecot og Courier-imap klager til tider på at sertifikat ikke fungerer. Da kan man kjøre følgende kommando for å lage nytt sertifikat. Kommandoen kjøres fra /etc/ssl/dovecot/ openssl req -new -x509 -nodes -days 365 -out cert.crt -keyout cert.key cat cert.key cert.crt > cert.pem Endre navnet på filene slik at de stemmer overns med configfilene til de […]

Read More
Linux

Transfer directories between computers using SSH and tar

When I need to transfer lots of files or directories between computers, I usually use tar and ssh together. Last time I used it however, I realized that perhaps not everyone knows how to do this. The procedure is very simple, and a full command could look something like this: tar -cf – directory/ | […]

Read More