Mix Installation (FreeBSD Jail)
HowTo install the mix server software for FreeBSD
The software for mix servers for FreeBSD is distributed as source code.
To compile the mix sources the libraries OpenSSL (at least v.0.9.7) and Xerces-C++ are required. Additional a C++ compiler, make and subversion are required too. You can install all stuff with the package manager of your your operating system. For FreeBSD it may be usefull to install subversion from ports, to disable BDB.
pkg_add -r make openssl xerces-c2-devel cd /usr/ports/devel/subversion && make install WITHOUT_BDB=YES && make clean
For premium mixes PostgreSQL database server, client and C-libraries for PostgreSQL clients are requiered too.
pkg_add -r postgresql84-server pkg_add -r postgresql84-client pkg_add -r postgresql-libpq++
Compile the source code
Checkout the latest stable version from our subversion repository. We recommend the use of the directory /home/mix for sources.
mkdir /home/mix cd /home/mix svn checkout https://svn.jondos.de/svn/proxytest/proxytest/branches/stable
Afterwards compile and install the mix software:
cd /home/mix/stable ./configure --enable-new-channel-encryption --enable-new-flow-control make make install
Enable additional features
Depending of the features needed by your mix, you can enable some more features for your mix:
./configure --enable-new-channel-encryption --enable-new-flow-control --enable-payment .... ....
Mandatory features for some cases:
- --enable-payment (Mandatory for premium mixes.) Specify if to build with payment support.
- --enable-user-bandwidth-limitation(Mandatory for free enty mixes.) Specify if to build with bandwith limitation for users (first mix). The limitation parameters can be specified in the mix configuration file.
Monitoring your mix:
- --enable-server_monitoring Specify if to build with state tracking for server monitoring. You can specify a monitor port in the mix configuration and fetch a XML file from this IP:port time by time to check your mix. A plug-in for Nagios, which is using the monitoring port, you will find in the mix source tree misc.
Additional Logging features:
- --enable-crime-detection Enable crime detection mode. Crime detection parameters can be specified in the mix configuration file. Do ONLY use it, if you are under constraint by authorities and law. For working well, all mixes of a cascade have to enable this feature.
- --enable-dataretentionlog Enable log messages according to German data retention law.
- --enable-bandwidth-limitation Specify if to build with last mix bandwidth limitation. The limitation parameters can be specified in the mix configuration file. (only exit mixes)
Create a system user account
It is not a good solution to run the mix server with root privileges. Create a new system user account (recommended name: mix) and specify this user account in the mix configuration file. After start up, the mix server will switch to this UID.
Create a system user account with useradd:
adduser --quiet --system --disabled-password --shell=/bin/false --group mix
Create a log directory
The directory and file for log messages will be specified in the mix configuration file. You have to create the directory and set safe permissions:
mkdir /var/log/mix chown mix:adm /var/log/mix chmod 0750 /var/log/mix
No logrotate configuration is necessary. The mix server creates a new file, if the log file size exceeded the configured limit.
Start the mix server
You have to create a mix configuration, became root, raise the number of max. open descriptors to the value specified in the mix configuration file and you can start the mix:
ulimit -SHn 32768 mix -c /path/to/config.xml
After startup the mix server will switch to the sytem UID specified in the mix configuration file.
Update the mix software
Like other software the mix is updated time by time. New features will be added, bugs will be fixed ... and so on. Join the operator mailing list to stay up-to-date about software updates. If an update is announced, run the following steps.
cd /home/mix/stable make distclean svn update ./configure --enable-new-channel-encryption --enable-new-flow-control --enable-server_monitoring --enable-payment .... .... make make install
After successful update restart the mix.
HowTo install squid proxy (only exit mixes)
The squid proxy can be installed by the package manager of your your operating system. Do NOT install squid3, please use the latest stable version of squid v.2.7. Only for testing purposes lynx may be installed too. Perl-Template-Toolkit is need to process the config template file. Alternativly you con do this changes by hand.
pkg_add -r lynx pkg_add -r p5-Template-Toolkit cd /usr/ports/www/squid && make install clean options for Squid are: SQUID_AUFS / SQUID_COSS / SQUID_LARGEFILE
Stop the squid proxy if it was running after installation and replace the configuration file with an optimized configuration and add the block list squid-block.acl. You may find the squid configuration files provided by Jondos in the mix source code, subdirectory misc/FreeBSD/ of the mix source code.
/usr/local/etc/rc.d/squid start mv /usr/local/etc/squid/squid.conf /usr/local/etc/squid/squid.conf.orig cd /home/mix/stable/misc/FreeBSD tpage --define extIP=126.96.36.199 squid.conf.free.template > /usr/local/etc/squid/squid.conf cp squid-block.acl /usr/local/etc/squid/
Afterward create the cache directories and wait, until the cache is created....
squid -z -d -3
... and start the squid proxy.
... and check if squid was working.
http_proxy=http://127.0.0.1:3128; lynx http://www.anonymous-proxy-servers.net
HowTo install Dante SOCKS proxy (only premium exit mixes)
The Dante SOCKS proxy can be installed by the package manager of your your operating system. For FreeBSD it is recommeded to install dante from the ports tree.
cd /usr/ports/net/dante && make install clean
Stop the dante proxy, download the configuration file danted.conf. It contains the blocklist for JonDonym mix servers and blocks port 25. You have to set the external IP address of your server in the config file (see line: external xx.xx.xx.xx), put the config file to /etc/danted.conf and restart dante.