Internet Bonding (not the same as Load Balancing) using OpenVPN TAP Tunnels

  • Thread starter Thread starter JB701
  • Start date Start date
  • Replies Replies 2
  • Views Views 3,176

JB701

🇵🇸🤝🇮🇳
Messages
2,424
Location
Kochi, KL
ISP
Airtel
Just wanted to create a thread about bonding two networks together for faster speed.

Unlike Load balancing where one connection is routed over one gateway and next one through next etc, bonding takes each packet through alternating WANs to a common VPS on the internet, these packets are then reassembled by the VPS and sent as a single connection to the actual site you are connecting to so you get full speed even over a single connection.

Bonding-drawio.png


Unlike load balancing where many connections (applications like torrents work well using load balancing as you are connecting to many peers all around the world) are needed to take proper advantage of the full bandwidth, bonding can work even on single connection transfers (eg. downloading a file on a browser).


Source

I followed this video and used the script to create 3 tunnels (two for Airtel and one for Tripleplay) on my OVH VPS in Singapore.



Then I added these 3 clients on my PFSense box at home:

Capture.png


I created a LAGG (Link Aggregation) interface in PFSense and add the OVPN Clients to it:

Picture1.png


Created a gateway for the LAG Interface (which is the internal openvpn ip of the server):

423.png

NAT Rules:

423.png


And Policy Routed my devices over the gateway:

423.png


Speeds turned out to be pretty mid, but this was just for testing anyway. I think there is some bottleneck somewhere (likely with the config) as I get 300Mbps using WireGuard. Maybe the i3 7th gen cpu on my PFSense box is too weak for 3x OVPN (even with no encryption).

I used the single connection test to make sure it wasn't just load balancing the two connection and instead actually bonding it.



Source
What I wanted to show was that the traffic was indeed flowing through both the ISPs despite the speedtest being on a single connection!:

fghjfgyj.png


Yes, the full capacity of my WANs aren't being utilized but I wanted to share this nonetheless.
 
Last edited:
This can work amazingly well but there shouldn't be too much congestion to the server and the latency should preferably be low.
There is probably good bit of congestion to SG and the latency is just too much for regular use.
You can use simple gre tunnels rather than openvpn. You don't really need encryption here or all the other over head ovpn comes with. Also, Since the traffic is now exiting from a Commerical IP, You will have problems accessing some websites.

This can work best if you have your own ASN and IP block and you get access to a company which has a node close to you and which will let you announce your AS
 
yea i noticed that when i was doing speedtest the cpu went to like 75-80% on the vm. ill try out GRE tunnels.
 
Back