How to route traffic to a certain domain via VPN?

Hello

I have the GL-MT6000. Before I bought this router, I was using OpenWRT 18.x (or similar version) which I installed myself on a Linksys router.

I would like to do the following:

  1. Set up a permanent VPN connection to NordVPN - they support OpenVPN for example
  2. Route all traffic matching https://imgur.com/* or https://*.imgur.com/* to this VPN
    1. All other traffic is unaffected
    2. If it’s not possible or easy to do it by URL, it’d probably work to do it via IP also.

Point 1 is easy enough, but I don’t know where to look for point 2. I can dig into the weeds of re-learning OpenWRT etc, but I was wondering if maybe there’s a quick and easy way through the GL iNet interface which someone could point me towards?

Many thanks in advance

Tom

Never mind! Sorry for the dumb post. I should have just looked into it myself, it’s so easy.

In case anyone else finds this thread and wants to know, here are the steps:

  1. Open the GL iNet interface
  2. Left sidebar: VPN → OpenVPN Client
  3. NordVPN was immediately shown to me as a possible client
  4. I selected that, and it asked me for my NordVPN credentials, with a simple tutorial as to how to get that
  5. Then I entered what countries I was interested in, and it automatically downloaded a list of servers
  6. I added one of those servers, clicked connect, and confirmed that all of my internet traffic was now going through NordVPN.
  7. Then in the VPN Dashboard, top right, I changed from “Global Mode” to “Policy Mode”
  8. Now I can specify From/To rules against NordVPN. In my case, in the To rules, I specified imgur.com as the target
  9. And that was it! Now I have all normal traffic going direct to the net, but imgur.com going through the VPN.

I love this, it’s awesome. This is exactly why I bought the GL router when I needed to upgrade; I wanted the power of OpenWRT under the hood, but also a nicer UI where I could do basic tasks easily.

It’s taken me 18 months until I actually had a router task I needed to do :smiley: But now I have, it was just as easy as I hoped.

Thanks!

2 Likes

Good practice!

Just follow the gl router docs to configure once time and finally find that everything is very easy and friendly.