Corporate VPN in Japan: a gateway for a Tokyo office and the quirks of Japanese networks
A Japanese server for a corporate VPN is for a company with an office, a branch or staff in Japan, and for those who work with Japanese partners and keep systems for them in the country. Networks in Japan are fast, but they are built differently from European ones, and those differences are exactly where people stumble when connecting a Japanese office to a gateway. Below are those differences and the requirements of Japan's personal data law.
Tokyo or Osaka, and what latency to expect
Most data centres are in Tokyo, with Osaka as the second large site. Staff in Tokyo get a few milliseconds to the gateway, from Osaka and Nagoya about 10 ms. From Seoul to Tokyo it is 30 to 40 ms, from Taipei and Hong Kong 40 to 60 ms, so a Japanese gateway also works for a small team in Korea or Taiwan. From the US West Coast it is around 100 to 120 ms, and from London or Frankfurt usually 220 to 260 ms. For a team in Europe a Japanese server is slow; it is set up for the staff in Japan. More about the locations on VPS in Japan and VPS in Tokyo.
A Japanese office often sits behind someone else's IPv4
Many Japanese offices and homes are connected to fibre over IPv6 using schemes that providers call IPoE or "v6プラス" (v6 Plus). IPv4 on these connections is shared between several subscribers: the office gets only a slice of the ports, and incoming connections on the usual ports never reach it. This matters for two reasons.
- The office must bring the tunnel up. The gateway on the VPS waits for connections, and the office router connects to it on its own. The reverse setup, where the server connects to the office, will not work on such lines.
- Turn on IPv6 on the gateway. If the server has IPv6, the office can connect to it directly over IPv6 instead of going through the provider's shared IPv4. That is both faster and more stable. So when choosing a plan, look not only for a dedicated IPv4 but also for IPv6; more on VPS with IPv6.
Protocol: IPsec for the office, WireGuard for laptops
Yamaha RTX series routers and similar models are very common in Japanese companies, and they are designed primarily for IPsec. So the tunnel between the office and the gateway is easiest to build on IPsec with IKEv2: the router is configured from a standard template, and strongSwan runs on the server. For staff laptops WireGuard is more convenient, since it reconnects quickly when the network changes, for example when moving from office Wi-Fi to mobile data. Server requirements are on VPS for WireGuard.
Another Japanese subtlety concerns packet size. On IPv6 connections with shared IPv4 the maximum packet size is smaller than usual, and if the corporate VPN settings do not account for it, the tunnel seems to work but internal web interfaces load only halfway and large files hang. Lowering the MTU in the tunnel to about 1380 bytes usually fixes it.
You do not need much in the way of resources. A team of up to 20 people needs 1 core and 1 GB of memory; an office of 50 with IPsec and constant file exchange needs 2 cores and a 1 Gbit/s port. Japanese plans sometimes have traffic allowances, so video calls and updates are better routed outside the tunnel.
APPI: Japan's personal data law
Japan has the Act on the Protection of Personal Information, APPI, overseen by the PPC commission. Since April 2022, certain kinds of breaches, for example those affecting more than a thousand people or caused by an attack, must be reported to the commission, and the affected people must be notified. The first report is filed quickly, within a few days, and a detailed one later. Without a VPN connection log with the username, time and address, it is hard to understand the scale of a breach within that time.
If data about Japanese staff or customers is transferred to servers abroad, the law requires either the people's consent, with advance information about which country the data goes to and what protection rules apply there, or assurance that the recipient protects the data to APPI standards. Keeping the gateway and the logs inside Japan makes this simpler.
Access, and a backup for natural disasters
Give every employee their own key or certificate, add a second factor for administrators, and revoke access on the day someone leaves. Redundancy in Japan deserves more thought than usual: earthquakes and typhoons sometimes knock out connectivity across a whole region. If the main gateway is in Tokyo, put the fallback in Osaka or outside the country, for example in Singapore, and hand out the second profile to staff in advance.