Tagging and rerouting any traffic on Untangle

Tagging and rerouting any traffic on Untangle router does not have preconfigured application profile
 02/04/2021 20:12:48
 Varga Gábor

By default, Untangle's application control does not have any configuration for a specific HTTPS traffic. All required options must be configured manually in order to you could send it via normal routing. This was required for me to I could reroute the traffic of HBO GO because it cannot be used via NordVPN tunnel.

So, what is required to it works.

Step 1: Configure the application flagging 

Flagging is required to make your untangle instance aware that you are monitoring your traffic. For a generic HTTPS traffic, you need to perform the following flagging settings:

Open the Apps => Application Control => Applications and Search for SSL and Tick the Flag column, and Save the settings.

Step 2: Configure tagging

This is the most important setting, because here you can put a tag value for all traffic which fulfills the conditions. If a session is already tagged, then you can do with the traffic whatever you want (e.g.: you can send it via an encrypted vpn, you can send it via an other WAN connection etc.).

Open Config => Events => Trigger panel, and click to Add button for opening the new Trigger addition panel

- Description: write something related to your trigger

- Class: ApplicationControlLogEvent

- Condition: detail = *<part_of_url>*

- Action type: Tag Host

- Target: sessionEvent.CClientAddr

- Tag Name: 30 (but whatever you want as tag lifetime)

- Tag Lifetime: this can be also any value. Important that if a connection already established via a rerouted way and the tag disappears after the lifetime, the other non-tagged traffic can be redirected via VPN. So normally the 30 seconds should be enough to build up and establish a traffic and after 30 seconds all other traffic can go through any VPN tunnel.

After this step is done, and you opens a page which is already tagged, you should see the tagged traffic on the Sessions part:

If you see the circled Tags, your configuration is working. 

Note: generally the Tags column is at the end of the table. I moved to from its original place because normally I didn't see it.

Step 3. Configuring the rerouting

At this example I am using the VPN Tunneling feature of untangle. I have a NordVPN subscription, and in my case all HTTP/HTTPS traffic are going through via NordVPN tunnel. However, both Netflix and HBO GO must go through normal internet connection because these services are not working via NordVPN. In this example I suppose you already have a configured VPN profile, so this configuration snip does not any information how you must configure your VPN tunnel.

Navigate to Apps => Tunnel VPN => Rules and click to Add button

You can configure your conditions based on the following examples (one is sending traffic via NordVPN, other is sending traffic via normal internet)

If you configured if properly, you should see (in Sessions' Interface tab) that a traffic is sent via a tunnel, but other can send via normal internet from the same client: