Routing Specific Traffic to a Privacy VPN

Today, we are going to route only specific types of traffic into the VPN we set up HERE.

NOTE: This form of routing to a VPN is not strict. If the VPN connection is terminated, the traffic being routed to the VPN will fail over to the active WAN interface.

In your UniFi console, head to Settings – Routing and you should see the Traffic Routes tab selected.

UniFi Network settings, Routing page with the Traffic Routes form: What to Route, On, Interface and Description

Click on the “Specific Traffic” sub-tab

Traffic Routes form with the Specific Traffic option marked

Under “Category”, there are a few options. The Category you select is the destination that will be routed to the VPN. In this tutorial, I am going to route google.com to the VPN.

Specific Traffic Category dropdown open with the options Domain Name, IP Address and Region

Here you can see we entered “google.com” under the domains. I selected All Devices in the “On” section and the Interface is set to my Mullvad VPN.

Specific Traffic route for domain google.com on All Devices through the Mullvad interface

This route says functions like so, if ANY device trys to go to google.com, send that request over the Mullvad VPN

In the “On” section, you can select specific networks or even individual devices to apply to rule.

Need help with your website?

Dynamic Technologies builds, hosts and maintains websites for small businesses in Coeur d'Alene and North Idaho.