PepVPN / Speedfusion tunnel selection based on geographic location

The following article describes how a Peplink router with built-in GPS can connect to different Speedfusion profiles based on the geographic location of that Peplink router.


A Pepwave MAX HD4 is installed in a cargo ship.
This ship sails from Europe to Australia.
The HD4 has a bonded Speedfusion VPN tunnel to a Peplink Balance 710 in a data center in Europe to be able to bond different WAN connections (WiFi-as-WAN, cellular and satellite).


When the ship is sailing closer to Australia the latency on the Speedfusion tunnel gets very high because of the distance to the datacenter in Europe.


  • Install (a combination of) Peplink routers or FusionHub virtual appliances in data centers in different global locations;
  • the MAX HD4 needs to automatically connect to the Fusionhub in the nearest datacenter.

Step by Step Instructions:

Select the Peplink router or Fusionhub that functions as the hub in a datacenter.
Select the device details and click on “edit”.
Create a unique tag (Oz_DATACENTER is used as a tag in this example).

Create another tag for devices that will be used as the endpoint for this connection; in this example, we created a tag “ship” and added it to the unit that is installed on our ship.

2: Select : Group Level > Settings > Geo-fencing to add a new Geo-fenced area.

Click “Add”

Name the Geofenced area and add the Tag of the moving devices to the filed “Apply fence on”

Add a Zone for the Geofence to be active

Next add a tag to the “action : Device Tagging” section.

Devices with this tag will get this tag (and thus the PepVPN / Speedfusion profile associated with this tag) applied when they enter or leave the geo-fenced area.
Save the Geo-fence.

Next you need to create a PepVPN profile around the Peplink that is used in the datacenter.

Select: PepVPN / Speedfusion > Configuration

Enable PepVPN / Speedfusion configuration and Add a profile.
Don’t forget to save the changes!

Create a PepVPN / Speedfusion profile and select the HUB device you are using for this profile.

Select all devices you want to potentially have connected to this hub.
While the geofence can tag any device going in/out of the fence area, only the devices selected as endpoints here will connect to the hub.

At the profile options step, enable the "Dynamic Links" checkbox, and select the tag previously used as the hub with the applied geofence.
This combobox will be restricted to only those present on the selected hub device.

Once this has been configured and saved, any endpoints entering/leaving that geofence will have their pepvpn connections dynamically change depending which device is within the geofenced area.

Tip: To create an always-available backup connection, simply create a normal profile that contains all your dynamic devices, and assign it a higher cost than your dynamic connection