Freeroute is a traffic router which can direct traffic to different gateways based on destination domain. It is designed to be used in conjunction with a VPN client such as OpenVPN, to allow traffic to be routed to the VPN or directly to the internet.
Freeroute provides it's own DNS server which can be used to resolve domains to IP addresses. The IP addresses are then used to determine which gateway to route the traffic to.
Freeroute is designed to be run on a machine within a local network. If the machine is a virtual machine, it should be configured to use bridged networking.
Free means free as in freedom, not free as in beer.
There is an install script which will install Freeroute and configure it to run on startup. The install script will also install and configure OpenVPN client.
It is designed to be run on a fresh install of Debian 11 or 12.
It configured to run as a non-root user with sudo privileges.
To install Freeroute, do the following steps:
- Download the latest release from https://github.com/admitrievsky/freeroute/releases/latest
- Extract the archive
tar -xzf freeroute.tar.gz - Run the install script:
sudo ./install.sh <network interface> <openVPN config file>
-- or --
sudo ./install.sh <network interface> <openVPN config file> -u <username> -p <password>
where
<network interface>is the primary network interface (e.g. eth0)<openVPN config file>is the OpenVPN config file to use<username>and<password>is the username for the VPN. This is optional and only required if the VPN requires authentication.
The release archive could be run directly without installation.
- Install python dependencies with poetry
poetry install - In the
freeroutedirectory, putconfig.yaml. Example config file will be created on the first run. See config.py for more information. The script runs DNS service on port 5553 by default, but it could be configured to run on port 53 if run as root. - Configure domain lists.
- Run
python3 service/main.pyto start the service.
Configure your local machines to use your machine with Freeroute as a DNS server and gateway.
Visit http://<freeroute-host>:8080 to see the web interface.