Squid and Dante in FreeBSD-Jails

From JonDonym Wiki
Revision as of 13:38, 4 April 2014 by Kn (Talk | contribs)
Jump to: navigation, search

En2.png De2.png    <- prev | Content | next ->

HowTo install squid proxy (only exit mixes)

The squid proxy can be installed using the ports system. Do NOT install "squid", please use the latest version of squid3. Only for testing purposes lynx may be installed, too. You may install squid3 from ports (FreeBSD) or pkgsrc (OpenBSD, NetBSD):

cd /usr/ports/www/lynx && make install clean
cd /usr/ports/www/squid3 && make install clean

Add a line to /etc/rc.conf


Make a backup of the original squid.conf.

cd /usr/local/etc/squid3/
mv squid.conf squid.conf.orig

Replace the configuration file with an optimized configuration and add the block list squid3-block.acl. You may find the squid configuration files provided by Jondos GmbH in the mix source code, subdirectory misc/FreeBSD/ of the mix source code. There are two squid.conf templates: one template for free services and one for premium services. Choose the suitable template and replace all occurrences of [% extIP %] by the external IP address of your server.

cd /home/mix/stable/misc/FreeBSD
cp -f squid3.conf.free.template /usr/local/etc/squid3/squid.conf
cp -f squid3-block.acl /usr/local/etc/squid3/
touch /etc/squid/squid-block.acl.local

If you were using an editor and apply the changes by hand, you have to change the following lines in /usr/local/etc/squid/squid.conf:

line 9:     acl localhost src
line 12:    acl to_localhost dst

Local extensions of the blocklist: If you extended the squid-blocklist.acl for your mix, please use the file /etc/squid/squid-blocklist.acl.local. It will not be overwritten by updates of the JonDonym blocklist. At least you have to create an empty file because it will included in squid.conf. For local blocked websites a special error message will be displayed to the user. It gives the information about possible access to the website by other cascades.

Error messages: The Squid configuration provided by JonDos GmbH replace the default error messages of Squid by special pages for JonDonym. The HTML pages are part of the mix source. You will find it in the subdirectory misc/squid-messages. Because some error pages are added, you have to use these messages. If you did not checkout the mix sources to the directory /home/mix/stable you have to edit your squid.conf. The value of error_directory has to point to the error message directory.

error_directory /home/mix/stable/misc/squid-messages

Afterward start the squid proxy.

/usr/local/etc/rc.d/squid3 start

... and check if squid is working.

http_proxy=; lynx http://www.anonymous-proxy-servers.net

Updating the JonDonym blocklist

Time by time the JonDonym blocklist will be updated. You will receive a notice by the mix operator mailing list.

cd /home/mix/stable
svn update
cp -f misc/FreeBSD/squid3-block.acl /usr/local/etc/squid3/squid3-block.acl
/usr/local/etc/rc.d/squid3 reload

HowTo install Dante SOCKS proxy (only premium exit mixes)

The Dante SOCKS proxy can be installed from the ports tree.

cd /usr/ports/net/dante && make install clean

Add a line to /etc/rc.conf


Keep a copy of the original sockd.conf.

cd /usr/local/etc/
mv sockd.conf sockd.conf.orig

Install the configuration file sockd.conf provided by JonDos GmbH. It contains the JonDonym block list and blocks port 25. You will find the sample configuration file in the subdirectory misc/FreeBSD/ of the mix source code. Replace all occurrence of [% extIP %] by the extern IP address of your server. YIn the example the extern IP address is

cd /home/mix/stable/misc/FreeBSD
cp -f sockd.conf.template /usr/local/etc/sockd.conf

And now start the Dante SOCKS proxy.

/usr/local/etc/rc.d/sockd start
Personal tools