Article 5D3K2 Tunnel/Proxy a specific allow list of domains through a VPN

Tunnel/Proxy a specific allow list of domains through a VPN

by
bgii2000
from LinuxQuestions.org on (#5D3K2)
I have a DO Droplet running Ubuntu Server 20.04. It has an Internet-facing interface Eth0 serving a web app through apache2 over SSL certified by LE. Pretty sure that part doesn't matter. Part of the app runs cURL to fetch RSS feeds from across the web. One of the feeds is returning a 403 because they've blocked DO's IP addresses. I'd like to proxy these requests through a ProtonVPN connection through OpenVPN. But ONLY the requests to that specific domain.

That said, I gave up trying to route by domain name since you can't do that, and figured I'd just hardcode all RSS requests to go to the VPN by telling cURL to use a separate interface. I think I need some combination of IP link commands and OpenVPN but my clumsy attempts at trying to set up a tun interface have only resulted in disconnecting the ssh session and requiring a restart to regain connectivity.

I'm finding lots of info on setting up a host as an OpenVPN server, but not a lot on how to set up the client beyond a default "route all traffic when connected to wifi" style setup.

Also, what mechanism should I use to get persistence? Will IP suffice or do I need NetworkManager?

Thanks!latest?d=yIl2AUoC8zA latest?i=WOHlILWaXt0:1lJYwlWBHYQ:F7zBnMy latest?i=WOHlILWaXt0:1lJYwlWBHYQ:V_sGLiP latest?d=qj6IDK7rITs latest?i=WOHlILWaXt0:1lJYwlWBHYQ:gIN9vFwWOHlILWaXt0
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments