|
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection.
The trouble is that I can't remember what it was called or where I saw it. A fruitless hour of searching has drawn a blank.
Can anyone help?
|
|
Haven't done it myself but google "Raspberry pi proxy server" and you will get links like this one
|
|
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection.
The trouble is that I can't remember what it was called or where I saw it. A fruitless hour of searching has drawn a blank.
Can anyone help?
It's certainly possible but depending on the speed of the connections a raspberry pi may struggle.
Also you will need a VPN server in the cloud.
Thanks Dan
|
Register (or login) on our website and you will not see this ad.
|
|
I'm pretty sure that somewhere on here I read about a way to run a proxy server using a Raspberry Pi on the network and a remote vpn server so that you can combine more than one internet connection. The big questions is; what exactly are you trying to achieve? Do you want some traffic from your LAN to route via your normal gateway and some to route out through the Raspberry Pi over the VPN? It's the word 'combine' that's got me puzzled.
Edited by caffn8me (Fri 05-Feb-21 13:45:44)
|
|
Need a bit more info really on what you are looking to achieve and your setup.
I think what you are asking is how to use multiple WAN connections in tandem to either increase speed or add redundancy. If that’s the case there are articles online about using Squid (a widely used Linux proxy server) with multiple WAN links but the ones I saw dated back a long time and it didn’t seem a nice solution. I assume the remote VPN server is to give all the links the same outgoing IP address when the traffic hits the internet by running VPN tunnels over each WAN link and then combining the traffic at the remote end.
If it was me I’d be looking at a hardware solution with a router that could load balance or do failover. I’ve used Draytek kit to do this in the past but there are other good options out there too eg Edgerouter, Mikrotik etc.
Best way to achieve this is with an ISP that would let you bond the connections together but that’s fairly specialist offering.
|
|
Are you thinking of OpenMPTCProuter?
You can certainly run it on a RasPi
I recall there's been a couple of threads on here about using it, I don't think either used a Pi though.
Edit - Yep, found these
https://forums.thinkbroadband.com/mobilebroadband/f/...
https://forums.thinkbroadband.com/general/f/4668406-...
There's also Speedify
https://speedify.com/blog/raspberry-pi-bonding-route...
Edited by Davey_H (Fri 05-Feb-21 18:39:05)
|
|
Basically, I currently have a 4G connection with pretty good uplink speeds, but poor downlink and poor ping times.
I should have FTTC in a week or two, which should have decent ping and downlink, but not good uplink speeds.
What I want to explore is some way to combine these. Only interested in better performance: no need for a VPN otherwise.
I have a spare Pi4 and I have a (mostly) spare server in a German hosting centre, running Debian 10. The only worry is that openmptcprouter docs say that "SSH port is changed to 65222 (TCP)" which would be a bit of a pain: a different (non-standard) port is being used for a few things there.
I'm not keen to spend a lot of money on extra hardware for just an experiment.
I think that OpenMPTCRouter was indeed the name I'd forgotten. Can't think how - it's so catchy!
Edited by hoopla (Fri 05-Feb-21 19:56:45)
|
|
There's also Speedify
https://speedify.com/blog/raspberry-pi-bonding-route... I'm struggling to make sense of this one.
They say you can use a Pi and that you can have the LAN side connected to the ethernet port, but it says "Note that you can only share over an Ethernet port that is not connected to an internet source. Pick one ethernet card to share with your client or client devices, and it must not be one of the ones that are connected to the internet already."
I've never seen a Pi with more than one ethernet port. Am I missing something?
|
|
USB network adapter or wifi on the newer ones?
|
|
USB network adapter or wifi on the newer ones?
Tagged VLANs into a switch? But if the OP knew what tagged VLANs were, then they probably wouldn't be asking questions here
I'll try to make one thing clear. Some of the advice offered previously has been about routers with dual-WAN ports. These are easy to deploy. However what happens with these is that any particular session (e.g. TCP session to fetch a web page) goes over one or other link - both inbound and outbound traffic for that session. This may be useful if there are several people in a household who are using the Internet simultaneously, and to balance their usage between them.
However this *can't* be used to combine bandwidth for a single session (e.g. a single large download), nor to use one link for upload and the other link for download as part of the same session. I think this is why the OP wants some sort of VPN solution, where two VPN connections are connected to some remote VPN node, and traffic is load-balanced between them.
Unfortunately, I don't think this is going to work well.
From my experience, probably the thing most likely to work would be two L2TP sessions with PPP-multilink across them, since this is the same technology used for "bonding" discrete PPP sessions. You need an L2TP termination point at the other end. AAISP offer an L2TP service for £10 per month, but I don't know if it supports multilink. Plus, you need a router which would do L2TP and multilink (possibly their "firebrick" device can do this), and you need to understand how to configure L2TP and multilink.
Maybe some VPN supplier offers a packaged solution for bonding that's easy to deploy. In which case, they'll also advise on what device or software is needed at the client side, to work with their VPN.
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.
I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
|
|
Some years ago there were quite a few bonded lines set up using the firebrick and AAISPs L2TP service in an attempt to get higher bandwidth on ADSL2+
Seemed to work well from the posts on here describing it.
I have never seen a solution mentioned on here that was successful for 2 connections with different latencies.
|
|
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.
I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot. No, I don't think it will be any good either, but the facilities are sitting idle, so it may be worth a try.
And that's why I won't even consider buying special hardware to try it, or paying for two expensive FTTC lines.
Not much point for me in having failover from FTTC to 4G - in my experience, a working FTTC connection is easily reliable enough. And if it isn't, it needs to be fixed.
The other alternative is to simply have two virtual networks and choose between them, but that's more faff than I want on a day-to-day basis.
|
|
I'd agree with what candlerb says.
I also have hilariously unreliable FTTC that Openreach think is 'good enough' and reliable 4/5G but the former has super low latency and the latter is fast but high latency.
If you want bonding, you need to use a service to 'combine' the streams on the other end. The only ones that do that are essentially 'SD-WAN' providers, which are proprietary and £££ (Cisco Meraki, Silverpeak, Peplink Speedfusion, VMWare Velocloud etc). The reason for this is that SD-WAN is non-standard and still 'new', but essentially all involve putting a VPN to a concentrator and then managing the network via various technologies including OSPF and link aggregation and so forth. The point is you can use any ISP or connection underneath them for the 'physical network', but your locked into the tech.
Opensource SD-WAN exists, but it's very 'beta'. OpenMPTCPRouter is a modified OpenWRT to do MPTCP, but its a little unnecessarily complicated and really feels more like a testing ground for using multipath than a solid solution. Another is FlexiWAN, which allows 3 free devices. But both of these are a bit ropey. If you want an open source it's best just to have a VPN to your own VPS or server and just use simple aggregation across these links, but it's fragile.
Finally you have ISPs. Cerberus, AAISP, Watchfront, Sharedband and Evolving all provide bonded broadband solutions as a fully managed package. Prices are more than a multiple of X lines due to the need to use more expensive CPE equipment.
Finally the other option to bonding is failover. 'Failover' between 4G and FTTC and back again is considerably easier. In fact most cheap routers will support failover which just involves pinging a host continuously and flipping the link to keep up time, but you're only using the bandwidth of one link at a time.
|
|
An Edgerouter X costs around £45.
It supports both loadbalancing and failover.
Load balancing allows you to use two links to increase your capacity.
It's not as smooth as bonding and using a higher end router but it will be easier to set up than a Pi. Which once you have bought dongles to give you extra ethernet ports will cost as you as much anyway.
I have an Edgerouter X which for a few weeks was load balancing an AAISP FTTC link with a Virgin 150 Mbps link.
It now load balances the Virgin link with a Communiuty Fibre 1 gig FTTP link.
|
|
mptcprouter.
|
|
|
|
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.
I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
Primary / failover would be straightforward with FTTC and 4G WAN links.
I’m still scratching my head how bonding 2 *very* dissimilar links with not only with completely different bandwidths but also (especially for 4G) unpredictable latencies is going to work in practice. How do out of sequence packets get handled? What happens with UDP and audio and video streams on calls for example?
|
|
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.
I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot. No, I don't think it will be any good either, but the facilities are sitting idle, so it may be worth a try.
And that's why I won't even consider buying special hardware to try it, or paying for two expensive FTTC lines.
Not much point for me in having failover from FTTC to 4G - in my experience, a working FTTC connection is easily reliable enough. And if it isn't, it needs to be fixed.
The other alternative is to simply have two virtual networks and choose between them, but that's more faff than I want on a day-to-day basis.
Have a read of this blog...
http://ltehacks.com/viewtopic.php?f=21&t=1078
|
|
Have a read of this blog...
http://ltehacks.com/viewtopic.php?f=21&t=1078 Thanks, That's very useful and quite heartening.
I don't think I can do much until I get the FTTC up and running, though perhaps I can try setting up the remote server end, or at least try doing a test installation of it on a local server, to discover what it might break!
|
|
Be really interested to hear how you eventually get on with it.
As I said in my previous post, it makes me wonder how out of sequence packets are dealt with when there is a potential for quite large variability between the type of links used.
Good luck with it all.
|
|
Load balancing works well when you have lots of things happening.
|
|
Any multi WAN Draytek with session based load balancing has always done a damn fine job for me, have used one with 3 x mobile connections and currently 2 x FTTP connections.
No its not bonding but any multi session activity is handled very well. Always a few on Ebay to pick up cheap.
|
|
I don't think you'll really find a solution that uses the downstream from FTTC and the upstream from 4G. Generally the return path is going to be the same as the outgoing path. Fully bonded could potentially do it but that needs something at the other end as well. Load balancing isn't going to do what you want.
Personally I think for your specific scenario you aren't going to easily find a solution.
|
|
So far, there have been some hitches in the path... For one thing, the FTTC isn't due to be installed until late next week. And for another, I can't remember where I put the spare Pi4 so I've dug out an old Pi3 to stand in for it.
So far, it seems to work well enough with only one WAN connection. A bit slower than going direct, but not a lot.
The speed difference is less than the normal variability of the 4G service. The latency is about 5ms slower. I'm guessing that the Pi4 will be better, when I remember where I put it.
Yes, I know it's pointless aggregating just one connection, but it gives me a feel for the overhead and helps me work out the setup.
I'll see if I can find another SIM card and try with two 4G connections.
|
|
This is fully bonded and there is something at the other end. That's the whole point of it.
There is a Pi running router software and connecting to the different WAN connections, stuffing all the traffic into a pipe that emerges in a VPN server in a well-connected hosting centre. The one I have available is in Germany, which may account for the few extra ms of ping..
I cancelled my London server a few months ago: the amount of hacking attempts on that was getting ridiculous.
Whether combining will work well remains to be seen, but it does work!
|
|
my 2x 4g gives about 170 down and 60 up aggregated across two 4G providers.
multipath tcp seems to have some clever schedulers to help deal with out of order packets etc - my two 4g links are very different - ee and three (three is terrible).
been fine even for videoconferencing. seems strange that it works, almost voodoo. but it does appear to work well.
|
|
USB network adapter or wifi on the newer ones?
Tagged VLANs into a switch? But if the OP knew what tagged VLANs were, then they probably wouldn't be asking questions here 
I'll try to make one thing clear. Some of the advice offered previously has been about routers with dua moml-WAN ports. These are easy to deploy. However what happens with these is that any particular session (e.g. TCP session to fetch a web page) goes over one or other link - both inbound and outbound traffic for that session. This may be useful if there are several people in a household who are using the Internet simultaneously, and to balance their usage between them.
However this *can't* be used to combine bandwidth for a single session (e.g. a single large download), nor to use one link for upload and the other link for download as part of the same session. I think this is why the OP wants some sort of VPN solution, where two VPN connections are connected to some remote VPN node, and traffic is load-balanced between them.
Unfortunately, I don't think this is going to work well.
From my experience, probably the thing most likely to work would be two L2TP sessions with PPP-multilink across them, since this is the same technology used for "bonding" discrete PPP sessions. You need an L2TP termination point at the other end. AAISP offer an L2TP service for £10 per month, but I don't know if it supports multilink. Plus, you need a router which would do L2TP and multilink (possibly their "firebrick" device can do this), and you need to understand how to configure L2TP and multilink.
Maybe some VPN supplier offers a packaged solution for bonding that's easy to deploy. In which case, they'll also advise on what device or software is needed at the client side, to work with their VPN.
But to be honest, whatever you do, I don't think it will work well. You can't really combine two bad links to make one good link. You *can* combine two similar good links to make one good link with twice the throughput. FTTC and 4G have very different characteristics; if you divide your traffic between FTTC and 4G and find performance problems, it will be pretty much impossible to debug. TCP in particular can get very unhappy when packets arrive out-of-order, which will be the case when dividing packets between two links with very different latencies.
I think in this situation, multi-WAN with FTTC as primary and 4G as failover (or FTTC primary for some users and 4G primary for others) is simpler and easier to troubleshoot.
Your rather arrogant and dismissive comment set the scene.
You are indeed wrong. You can use this to combine two poor connections into one good one.
|
|
Are you thinking of OpenMPTCProuter?
You can certainly run it on a RasPi Update: I set it up and it seemed to work OK. Then I had to wait for the FTTC to arrive. That's started working and the results are every bit as good as I'd hoped.
Speedtest.net reports the latency as the latency of the fttc connection, the download speed is about 85% of the two separate download speeds combined, and the upload speed is more like 90% of the two upload speeds combined.
TBB speedtest reports even higher speeds (pretty much 100% of the combined speeds, up and down). Even for the single thread download it's significantly faster than the FTTC sync, but also reports higher latency.
I'm more than pleased with the results.
|
|
Excellent result.
Is this using your RasPi 3 or 4?
|
|
Thats great to hear. Nice work!
|
|
Excellent result.
Is this using your RasPi 3 or 4? This is with a 4.
I found the Pi4 before the fttc went live. It was on the floor, right next to my desk. I'd looked all over for it!
As I feared, they reconnected the fttc to the cabinet 1.2 km away, rather than installing a new line to the cabinet 200 metres away, so the sync is 29.57 down, 6.95 up.
This combined with 4G gives me 14ms, 46.93 down, 41.31 up:
https://www.speedtest.net/my-result/d/ca29ffb7-fe44-...
or
Edited by hoopla (Thu 25-Feb-21 19:43:29)
|
|
this is what mine looks like with 2x 4g
https://www.speedtest.net/result/10994989504.png
it really is a pretty decent solution when the masts dont go down. was down to one mast for a good couple of weeks there
|
|
this is what mine looks like with 2x 4g
https://www.speedtest.net/result/10994989504.png
it really is a pretty decent solution when the masts don't go down. was down to one mast for a good couple of weeks there I wish I could get it that good! We used to have really good speeds from EE, but the mast we used was switched off for some reason. Three used the same site, but they came back on again there about a year later. EE didn't
But today I got this, which is good enough for my needs.
speedtest.net
or (later)
Edited by hoopla (Sat 27-Feb-21 17:42:55)
|
|
Speedtest.net reports the latency as the latency of the fttc connection, the download speed is about 85% of the two separate download speeds combined, and the upload speed is more like 90% of the two upload speeds combined.
I'm more than pleased with the results.
As am I, not quite believing it would be any good I bonded a 75/15 Plusnet FTTC and a 350/35 Virgin connection to an AWS endpoint. The Pi4 is not bothered by the workload and the results are in line with what's discussed above.
If I needed to put real volume through it I'd look for a VPS provider with lower data transfer costs though.
|