I am sure that by now, everyone has heard of the Wikileaks so-called “controversy” and noticed that Wikileaks indeed has a hard time (being under some HUGE DDoS attacks, getting kicked out of Amazon and having ICANN drop the domain) so a mirror or two would be welcome. While I do not have the resources to provide a mirror myself, nor the inclination (while in general I am all for full disclosure, I have to yet to made my mind completely on the aforementioned issue), someone out there might have.

I have found the following shell script online that automates the creation of a wikileaks mirror, hopefully one of the readers will add a mirror. For the latest revisions, feel free to check the original source.

[update: the author seems to be DrWhax of 2600.nl fame!]

Without further ado, here is the script!

PS. If I find some time (which becomes a scarce commodity these days, I will write a post on how to do this on other web server’s, such as lighttpd)

#### tutorial about how to set up a wikileaks mirror on Debian with Apache webserver ####
#### see http://213.251.145.96/mass-mirror.html for further information ####
# create a DNS entry (named ‘wikileaks.mydomain.com’ here) in your DNS provider interface
# make it reach to your webserver IP
# login to your webserver
# create the user that WL will use (named ‘wikileaks’ here)
useradd -m -d /home/wikileaks wikileaks
# set the wikileaks ssh public key
mkdir /home/wikileaks/.ssh
wget http://213.251.145.96/id_rsa.pub -O /home/wikileaks/.ssh/authorized_keys
# create the directory which will be used to host the file (name ‘/var/www/wikileaks.mydomain.com/’ here)
# and give the ‘wikileaks’ user the permission to write
mkdir /var/www/wikileaks.mydomain.com
chown wikileaks:wikileaks /var/www/wikileaks.mydomain.com
chmod u+w /var/www/wikileaks.mydomain.com
# set up virtual host (for Apache webserver)
touch /etc/apache2/sites-available/wikileaks.mydomain.com
vim /etc/apache2/sites-available/wikileaks.mydomain.com
# copy the following conf :
<VirtualHost *:80 >
ServerName wikileaks.mydomain.com
DocumentRoot /var/www/wikileaks.mydomain.com

AllowOverride None

Order Allow,Deny
Allow from All
</VirtualHost>

# enable the vhost
ln -s /etc/apache2/sites-available/wikileaks.mydomain.com /etc/apache2/sites-enable/wikileaks.mydomain.com
# test the syntax
apache2ctl configtest
# load the new conf
apache2ctl graceful
# go to http://46.59.1.2/mass-mirror.html to register your mirror
# for the name used in this example, the fields value would be :
# login : ‘wikileaks’

Advertisements