Auckland, New Zealand
+64 2239 10000
gareth.cheyne@gmail.com

UBIQUITI :: Unify USG-Pro4 and Express VPN over VLAN

After endlessly trolling around the internet trying to find a config setup for Unifi USG-Pro4 to tunnel some of my traffic over a VPN via a VLAN I have finally come up with this.

Go watch this guys video to the point of welling up a VLAN, and Wireless network then use this config for Express VPN.

 

{
"firewall": {
"modify": {
"SOURCE_ROUTE": {
"rule": {
"10": {
"action": "modify",
"description": "Route ExpressVPN Network to vtun0",
"modify": {
"table": "1"
},
"source": {
"address": "192.168.50.1/26"
}
}
}
}
}
},
"interfaces": {
"ethernet": {
"eth0": {
"vif": {
"50": {
"firewall": {
"in": {
"modify": "SOURCE_ROUTE",
"name": "LAN_IN"
}
}
}
}
}
},
"openvpn": {
"vtun0": {
"config-file": "/config/openvpn/expressvpn-usa.ovpn",
"description": "ExpressVPN Tunnel"
}
}
},
"protocols": {
"static": {
"table": {
"1": {
"interface-route": {
"0.0.0.0/0": {
"next-hop-interface": {
"vtun0": "”"
}
}
}
}
}
}
},
"service": {
"nat": {
"rule": {
"5000": {
"description": "ExpressVPN USA Clients",
"source": {
"address": "192.168.50.1/26"
},
"outbound-interface": "vtun0",
"type": "masquerade"
}
}
}
}
}