Microsoft Windows™
Freelan works for all modern Windows™ versions, in both their 32 bits and 64 editions.
Compatibility list:
- Windows Vista™
- Windows Seven™
- Windows 8™
- Windows 10™
Linux
Freelan can be used on all modern (and even not-so-modern) Linux flavors.
You can also easily compile it from source on all distributions.
Apple Mac OSX™
Freelan runs on Mac OSX starting with OSX Lion™ (10.7).
Compatibility list:
- OSX Lion™ (10.7)
- OSX Mountain Lion™ (10.8)
- OSX Maverick™ (10.9)
- OSX Yosemite™ (10.10)
- OSX El Capitan™ (10.11)
- OSX Sierra™ (10.12)
Downloads
Make sure you get the installation package that matches your operating system architecture (32 bits or 64 bits).
While freelan 32 bits itself can run on a 64 bits Windows, the virtual network interface driver won't.
Freelan requires the Visual C++ 2013 runtime to operate. You may already have it installed for other softwares but if you don't (or in doubt), you should download and install it.
Download the Visual C++ 2013 runtime
Installation instructions
Just double-click on the installer: this will install freelan's Windows service as well as the virtual network interface driver (aka. "TAP adapter").
Make sure you install all the components by not unchecking any of those in the installer. Those options are reserved for experienced users.
Configuration
Upon installation, freelan won't be able to start because its configuration is incomplete. Edit the file at C:\Program Files\FreeLAN\config\freelan.cfg
with your favorite text editor.
For details about configurations, see this page.
Once your configuration is complete, restart the service by typing this command in "Start > Execute" (Windows key + R):
services.msc
This will popup the Windows services dialog in which you should see the "FreeLAN Service". Select that entry and press "Start" to start the service.
If the configuration is correct, the service will start normally and it will also start whenever Windows boots.
If the service refuses to start, then something must be wrong with the configuration. You can debug this by launching freelan from the command line.
Open a console (Windows key + R, then "cmd") and type the following commands:
> cd "C:\Program Files\FreeLAN\bin"
> freelan -c ..\config\freelan.cfg
This will start freelan in foreground mode and parse the configuration. If anything is wrong with it, the command will just stop and tell you what.
Once the configuration is fixed, try to start the service again.
Installation
Freelan is currently packaged for Debian and officially maintained. It is available via:
apt-get install freelan.
A Raspberry Pi repository is also available at: http://oss.leggewie.org/freelan/, provided by Rolf Leggewie, the official Debian Maintainer of freelan.
Configuration
The Debian freelan daemon can run simultaneously several separate configurations.
Copy the template configuration file at /etc/freelan/freelan.conf
:
# cp /etc/freelan/freelan.conf /etc/freelan/myconfiguration.conf
Edit your configuration file according to your needs (don't forget to specify both public and private key files) then edit the /etc/default/freelan
file like that:
# This is the configuration file for /etc/init.d/freelan
# Configuration files to load.
#
# Values should be separated by spaces.
# Each entry must match a file at /etc/freelan/.conf
#
CONFIGURATIONS="myconfiguration"
# Additional options that are passed to the Daemon.
#
#DAEMON_OPTS=""
Have you configured your firewall ?
Freelan by default listens on 12000/UDP.
For it to run correctly, you must ensure your firewall is correctly configured to allow freelan's communications inside and outside the VPN tunnel.
Finally, start the daemon:
# service freelan start
Starting freelan instance - myconfiguration:Reading configuration file at: "/etc/freelan/myconfiguration.conf"
Creating PID file at: "/var/run/freelan.pid.myconfiguration"
And freelan should now be running ! Congratulations !
Downloads
Freelan is available for Mac OSX as a .pkg
installer.
Download installer
Note that Freelan requires a tun/tap adapter on your system. You can get one for free on the tun/tap OSX website.
Installation instructions
Once you downloaded the installer, just double-click on it and follow the indicated steps.
Freelan is designed to run in the background as a daemon, using launchd
. At the end of the installation process, freelan registers itself to launchd
using the launchctl
command.
The installer installs the following files on the system:
/usr/local/sbin/freelan
- The main executable.
/usr/local/etc/freelan/freelan.cfg
- The default configuration file read by the daemon.
/usr/local/share/freelan/uninstall.sh
- An uninstall script (see details below).
/Library/LaunchDaemons/org.freelan.freelan.plist
- The launchd
daemon registration file.
Configuration
By default, freelan's configuration is incomplete and the daemon just won't run properly.
Edit the configuration file at /usr/local/etc/freelan/freelan.cfg
and adjust your settings. For details about the configuration, see this page.
You may test if your configuration is fine by issuing the following command in a terminal:
$ sudo freelan -f -d -c /path/to/your/configuration/file
Once the configuration is fine, just reload the service by typing:
$ sudo launchctl stop org.freelan.freelan
$ sudo launchctl start org.freelan.freelan
You can now check /var/log/syslog
to see if the daemon started properly.
Running several instances of the daemon
If you would like to run more than one instance of freelan in the background, follow these steps:
- Copy the
launchd
file at /Library/LaunchDaemons/org.freelan.freelan.plist
and rename it to something else (keep the extension).
- Edit the copied file and change the location of the read configuration file (defaults to
/usr/local/etc/freelan/freelan.cfg
).
- Register the new
.plist
file using the following command:
$ sudo launchctl load /Library/LaunchDaemons/your.new.file.plist
You should now have a another instance of the freelan daemon running on your system (as root).
Removal
Mac OSX .pkg
don't have any specific mechanism to uninstall apps. However, freelan's installer put an uninstall script at /usr/local/share/freelan
.
To uninstall freelan completely (this also removes the default configuration file in /usr/local/etc/freelan
), type the following command in a terminal (you will be prompted for your password):
$ sudo /usr/local/share/freelan/uninstall.sh
freelan should be completely removed from the system.