Reach an office network
This guide makes a whole network, for example your office LAN, reachable through a gateway asset, so that users can reach every device in it without installing anything on them. For what a Subnet is, see Gateway Assets.
In short
Create a Subnet with the network range in CIDR notation on a gateway asset in that network, grant it with a policy, and optionally name known hosts. A client that already sits in that range uses its local interface instead of the tunnel.
Before you start
- A gateway asset: a Linux or Windows machine inside the network with the agent in Asset mode and Online. See Reach a server. For high-traffic networks, use Linux.
- The network address and mask of the range, for example
192.168.1.0/24. - A user group to grant, and a policy or the intention to create one in the form.
- If the gateway asset should also hand out addresses on a separate segment, see Hand out addresses on a segment.
1. Create the Subnet
- Open Assets → Create → Subnet.
- On the General tab, select the Gateway Asset, enter a Name and the Network / Mask, for example
192.168.1.0/24. The mask must be between 1 and 32. A network starting with0.0.0.0is refused: use an Exit Node. - Optional: add known devices under Hosts, see Name devices in the subnet.
2. Choose services and grant access
On the Access tab, select the Services of the subnet and tick the policy under Policy Assignments. Without a selection, the predefined All service applies. Choose Apply. A policy for a Subnet is a destination like any other: see Policies.
3. Check the overlap with the client's local network
If the accessing client or asset already has an IP in the configured range, its traffic uses its local interface and does not go through the gateway asset. This is intended: a laptop in the office reaches the LAN directly. It also means that a user at home whose home network uses the same range, for example 192.168.1.0/24, cannot reach the office devices through the tunnel. Choose a range that is unlikely to collide, or give the office network a less common range.
4. Name devices in the subnet
Hosts map the IP address of a known device to one or more DNS names, so that users can type nas.example.com instead of an address.
- On the General tab, choose the green plus next to Hosts.
- Type the IP address and confirm it with the check mark or Enter. It must be an IPv4 address inside the subnet.
- Type one or more DNS names, separated by a comma or a space, and choose Done.
Hosts are saved with Apply. A host can later be turned into a Virtual Asset with the Policy Assistant, see Subnet Policy Assistant.
For names inside a domain served by your own DNS server, for example *.corp.example.com, set up split DNS instead of listing every host.
5. No NAT (only if needed)
By default, traffic to the subnet leaves the gateway asset with the gateway asset's own address. Devices on the subnet therefore see the gateway asset as the source, and replies find their way back. On the Advanced tab, Enable No NAT turns this off, so devices see the tunnel IP of the client. This works only if the router of the subnet sends traffic for the tunnel network to the gateway asset. The tunnel network is set under Settings → Network, see Tunnel network.
6. Keep some destinations direct (optional)
On the Exceptions tab, switch on Enable exceptions and list networks inside the subnet that clients should reach through their own connection instead of the gateway asset. See Exceptions for the purpose, and Send internet traffic through a site for a worked example.
Rules
- Each network must have a prefix length, for example
10.1.0.0/16. - It must be a valid network that is not in the list yet.
- It must have the same address family as the subnet, lie inside the subnet and be more specific than it:
10.1.0.0/16is valid for a10.0.0.0/8subnet. - Switching Enable exceptions off keeps the entries.
- Vendor presets exist only on an Exit Node, whose network covers every destination.
All fields of the form are in Subnets.
Verify
- From a client outside the network, connect. The Subnet appears in the app's list; hosts you named are listed below it. See Home and Connections.
- Reach a device in the range by its IP address or by a host name you added, for example by opening its web page in a browser.
- In the Admin Console, the Subnet's detail panel lists Hosts, No NAT and Subnet Exceptions.
If it doesn't work
- Nothing in the range is reachable. Check the policy and that the gateway asset is online. Check that the gateway asset can reach the device itself.
- It works in the office but not at home. The range overlaps the home network, see step 3.
- Devices answer, but the connection hangs with No NAT on. The subnet's router does not send traffic for the tunnel network via the gateway asset. Add the route or switch No NAT off.
- The exception is refused. See Rules.
- Names do not resolve: Names and DNS and Set up split DNS.
Next
- Make a subnet highly available
- Replace your VPN
- Start open, then narrow down: grant the whole subnet for a while, record what is used, then turn it into one Virtual Asset and policy per device with the Policy Assistant.
- Set up split DNS
- Reach a printer, NAS or camera for devices that need their own name and service.
- Make a Domain Controller reachable
See also
- Concept: Gateway Assets, Policies
- Reference: Subnets