Only route specific traffic through OpenVPN

I have a VPN provider that I would like to use for specific sites, as well as specific applications (port ranges), but I would like to have all the remaining traffic bypass the VPN and route normally.

The VPN provider uses OpenVPN. which is installed, along with the relevant luci interface and the required openvpn-openssl package. I have followed their guide as closely as I can, but some modification to the setup was needed due to depreciated options (guide was made for chaos calmer). Nevertheless, I have now made it to the point where (as far as I can tell) the connection is established, and the system.log is reporting no errors.
the guide says that all my internet traffic "should" be running through the VPN at this point, but it just simply isn't.

Q1: how can I verify that the VPN connection is actually working?

Q2: I would like to be able to specify a list of internet domains, as well as a range of ports, that will get routed through the VPN connection. Where do I start?

I would be happy to provide any info you need to help further.

Quick way to verify is with any of the what’s my IP sites. If your ISP address is returned, no, your VPN portal, yes.

Routing host names is nearly impossible for any website as, even if you could look up all the possible IPs for the host, most sites use multiple hosts and CDN providers

Those sites are reporting my public ip, so I am assuming that the VPN is not functioning. From the logs, the connection seems to be successful, but obviously the routing is not

1 Like

Please post here the output of the following command, copy and paste the whole block:

uci export network; uci export wireless; \
uci export dhcp; uci export firewall; \
head -n -0 /etc/firewall.user; \
iptables-save -c; ip6tables-save -c; \
ip -4 addr ; ip -4 ro ls tab all ; ip -4 ru; \
ip -6 addr ; ip -6 ro ls tab all ; ip -6 ru; \
ls -l  /etc/resolv.* /tmp/resolv.*; head -n -0 /etc/resolv.* /tmp/resolv.*

Please use "Preformatted text </>" for logs, scripts, configs and general console output.