Provides an easy way to set up multihoped OpenVPN connections.
Provides an easy way to setup multihop OpenVPN Connections.
This utility will allow you to create a list of OpenVPN Tunnels and start them cascaded.
e.g The the second tunnel will be established trough the first tunnel and so on.
Please see this Repo for more details in Setup and preperations.
You will need a FreeBSD build environment.
git clone git@github.com:pfsense/FreeBSD-ports.git pfSense-ports
cd pfSense-ports/security
git clone https://github.com/ddowse/pfSense-pkg-openvpn-multihop
cd pfSense-pkg-openvpn-multihop
make package
Please check the pfSense package development documentation for more information.
pkg add https://github.com/ddowse/pfSense-pkg-openvpn-multihop/releases/download/v1.0/pfSense-pkg-openvpn-multihop-1.0.txz
Create Backup of your configuration!
Make sure that your OpenVPN Clients connected succesfully to your provider
e.g:
nat on ovpnc1 inet all -> (ovpnc1) port 1024:65535 round-robin
Check routing like this
netstat -4nr
Check tunnel(s) for passing openvpn traffic
Interface and Port may vary
tcpdump -nv -i ovpnc1 port 1149
Check your IP.
curl ifconfig.co
Don’t forget to check your logs(!)
route-up "/usr/local/etc/openvpn-multihop/addroute.sh 95.211.95.232"
The IP is the OpenVPN Server of the next tunnel.
The script (addroute.sh)
/sbin/route add -host ${1} $route_vpn_gateway 255.255.255.255
This will add to the routing table:
95.211.95.232/32 10.3.3.2 UGS ovpnc1
Connecting now to the IP 95.211.95.232 will go trough the first tunnel.
When the tunnel configuration is extended. The steps as before are repeated and route-up and route-exec are changed to the new exit.
“John” had the idea for this package and provided the initial financial support to make it possible. Thanks.