Corporate VPN in Latvia: a gateway in Riga for offices in all three Baltic states
A Latvian server makes sense as a corporate VPN gateway for companies with an office in Riga, and for those whose branches, warehouses or shops are spread across Latvia, Lithuania and Estonia. Riga sits in the middle, about equally close to Vilnius and Tallinn, so a gateway there works well as the hub of the network that every office connects to. Below is how to build such a network, what resources it needs, what Latvian data protection and cybersecurity law expects, and where to keep the backup.
Riga in the middle of the Baltics
Staff in Riga see one or two milliseconds to the gateway, Vilnius and Tallinn about 5 to 10 ms, Stockholm and Helsinki 10 to 15 ms, and Warsaw around 15 ms. From Frankfurt it is usually 25 to 30 ms, from London 35 to 45 ms, and from New York roughly 100 to 110 ms. That means the Baltic offices work through the gateway as if it were next door, and a head office in Western Europe can use it for email, file shares and an accounting system without anyone noticing. A remote desktop from the US East Coast also works, though it will feel slightly less snappy. The locations are covered in more detail on VPS in Latvia and VPS in Riga.
Three countries, one gateway: the hub-and-spoke layout
Say the company has its head office in Riga, a warehouse outside Vilnius and a shop in Tallinn. Linking them in pairs is awkward: that is three tunnels, the warehouse may not have a fixed address, and a fourth site turns three tunnels into six. A hub-and-spoke layout is simpler. Each site brings up one tunnel to the gateway in Riga, and the gateway forwards traffic between them. A new site means one new tunnel, and nothing else has to be touched.
For the layout to work you need three things.
- A separate subnet for every site. For example, Riga 10.10.1.0/24, Vilnius 10.10.2.0/24 and Tallinn 10.10.3.0/24. If two offices both turn out to use 192.168.1.0/24, the gateway cannot tell where to send the packets.
- Rules between sites. The warehouse does not need the accounting system, and the shop does not need the HR file share. Allow only the routes that are actually needed on the gateway, so that a compromised till in the shop does not open the way to the whole network.
- Connections started by the sites. Each office router connects to the gateway's fixed IPv4 on its own. If the warehouse's address changes, the tunnel comes back by itself.
Connect the site routers over IPsec or WireGuard, depending on what they support. For MikroTik the setup is covered on VPS for MikroTik.
Resources and plan
In a hub-and-spoke layout the gateway encrypts traffic twice: it receives it from one site and sends it on to another. So when offices exchange a lot of data, the CPU works harder than with plain remote access. For three or four sites and up to 30 remote staff on WireGuard, 1 core and 1 GB of memory will do. If nightly backups run from one office to another through the gateway, or the tills sync with the stock system all day, take 2 cores and 2 GB. Many Latvian plans come with unmetered traffic, which is handy for backups. The port on cheap plans is usually shared with the neighbours on the host, so test the speed on a weekday during working hours. WireGuard suits remote staff laptops, while OpenVPN or IKEv2 with RADIUS authentication is the better fit when sign-in needs a second factor.
Latvian rules: data and cybersecurity
Personal data in Latvia is governed by GDPR and the national Personal Data Processing Law, and the supervisory authority is the Data State Inspectorate (DVI). You sign a data processing agreement with the hosting provider. A connection log with the account, time and address is personal data too, so describe in your staff policy why it is kept, who may look at it and how long it is stored, for example 90 days.
Since 1 September 2024 Latvia's National Cybersecurity Law has been in force, which is how the country implemented NIS2. Companies in energy, transport, logistics, healthcare, digital infrastructure and the other listed sectors must report serious incidents to CERT.LV and put security measures in place, multi-factor authentication among them. If your company is on that list, a second factor on the gateway and a connection log are needed in any case.
A backup in a neighbouring country
The hub is the single point without which nothing works. So keep the backup gateway in another Baltic country, for example in Lithuania or Estonia, and configure it on every site router as the second one. The rules between sites on the backup must match the main gateway, otherwise during an outage the warehouse suddenly sees the accounting system. Give every employee their own key and delete it on both gateways on the day they leave. Administrators sign in with SSH keys and a second factor.