You are not logged in.
I'm based in Europe, but my work happens in USA. My Europe-USA connection is in dial-up era: 300-500ms, 50Kbps (can go up to 1Mbps on long transfers).
So far I've been living with this, because company's VPN doesn't have to be a default gateway. Most service providers like Zoom, AWS, etc. usually solve this with some kind of "CDN". Other then that, 99% of my work is SSH, so I manage pretty well. But if for any reason I have to do anything heavier directly, it's a nightmare. I'd like to finally solve this, before it starts to really impact my work.
The problem is, that public Internet is garbage. I need to go through commercial networks. I've created a PoC like this:
- Inside OVH, 2 smallest VPS machines (100Mbps limit), one close to me, one in USA, but both in the same virtual private-network
- I used Wireguard to route everything through them.
- It works perfectly: stable ping ~88ms, stable 100Mbps to the US
The questions:
First and most important one: Am I really the only one with this issue? Aren't there any of-the-shelf/paid solutions for this?
If it's true, that people are actually that patient, and I have to solve it on my own, then...
Second question: how to manage routing for this? I'd like for all networks geolocated in the US to be routed thought my special VPN. My basic ideas so far:
- manage static routing table generated somehow from GeoIP or ICANN database.
- setup some dynamic routing protocol?
- dynamically and asynchronously monitor my connections, check GeoIP, if in America, then find network with whois and add special route.
PS. I know this is not the best place to ask this, maybe someone has a recommendation for some good network-heavy community?
Offline
although only wild guesses in the blue, from personal experience and work as technical customer support several possibilities come to my mind:
- wireless connection: somewhere between your device and the target endpoint seems at least one wireless link - if this link is within your network eliminate it by switch to a wired connection
- bad peering: maybe your isp has a bad peering to some hop in between towards the target endpoint while the peering to ovh is better and hence the overall path is better/faster
- overloaded routers: similar to peering issues it could be that the routing builds paths involving routers with high load or which are otherwise not up to the task
- issues at the target endpoint: same as with the path between you and the target endpoint there could be issues at its side like bad peering to whereever you stream originates, overloaded network infrastructure, issues within the network
overall your DIY vpn seem to be able to leverage OVH backbone between datacenters and the connection from you to the one vps and the connection from the other vps to the target endpoint are good enough to provide an overall improvement over a direct connecrion
if you know the destination ip you can run a tracepath to see where the latency jumps - but if its some router somewhere in between and it be the default peering route there's pretty much nothin you can do
overall very interesting issue with a neat "solution"
Offline
I'll just add, that I don't think it's not my connection's fault. I have 2 completely independent fiber connections in my house, main one goes straight (1 hop) to my city's main hub. I've tested with 5G as well. My Internet works perfectly in my country, works very well in Europe, just completely falls apart outside of that. It's the same in other countries, and multiple WiFi hotspots. I think it's just "normal".
Don't get me started on my "Asia" connection... it always goes through the US! Over 2 oceans! UPS is faster. Am I really the only one complaining?
Offline
well - if your uplink itself is solid within your area then it's likely bad peering and/or bad routing - something only the carriers along the path can do anything about - and unless you representing a big international fortune-500 company it's unlikely anything will happen
as for why connections between europe and asia are routed via usa instead of russia or india: capitalism - it's cheaper
Offline
Vodafun generaly travels via london, but
Frankfurt => London => Singapore
Frankfurt => London => Newark
This is most likely down to a peering issue, the packages don't travel "fastest", but "cheapest".
Google your ISP, "peering" and "shitty"
If you know the IP range(s) that need to go over the VPN i'd not bother w/ the overhead and hassle of dynamic routing and just add static table entries to reach them via the VPN.
Offline
I've found a great website: https://lite.ip2location.com/ip-address … by-country
Only 400k ip networks for the US. Would putting this amount into my routing table make Linux unhappy? I can't find how it works, but I assume it's somehow indexed, so it's just a matter of memory usage, right?
If you know the IP range(s) that need to go over the VPN i'd not bother w/ the overhead and hassle of dynamic routing and just add static table entries to reach them via the VPN.
Unfortunately it's to dynamic.
Offline
https://www.procustodibus.com/blog/2021 … alculator/
ARIN has probably like 50 /8 blocks, the problem with this approach is that doesn't say much about the geographical position of the actual host and the latter isn't necessarily static either, so you'll have to continuously update the datebase.
You're generally looking for an iptables rule to mark packages based on the geoip lookup and then use that mark to select the routing table
https://superuser.com/questions/1077981 … on-country
https://serverfault.com/questions/34511 … -interface
Whether the overhead is worth it (or brings the resulting performance below the poor current routing) is a different matter - and you'll also have to merge that w/ the wireguard settings.
Depending on the scenario the most efficient way could be to conditionally activate the VPN "when you need it".
Offline