You add one rule on your router: everything coming from your machine subnet goes to Access Gate first. Nothing changes on the machines, and removing the rule undoes it at once.
This is the recommended way to put machines behind Access Gate, and it is step 4 of the quick start. Use the other ways only if you cannot add a rule on your router.
The example
Replace these addresses with yours.
| What | Example |
|---|---|
| Your machine subnet | 192.168.1.0/24, router 192.168.1.1 |
| A machine on it (a PLC) | 192.168.1.10, twin address 100.64.1.10 |
| A server it talks to | 192.168.2.20 |
| Access Gate | 100.65.0.6, on the dedicated subnet 100.65.0.0/29 |
Each machine's twin address keeps the last number of its real address: 192.168.1.10 becomes 100.64.1.10.
1. Add the rule
On your router, send everything that comes from the machine subnet to Access Gate, whatever its destination. On a Linux router:
# Everything from the machine subnet goes to Access Gate first
ip rule add from 192.168.1.0/24 table 100
ip route add default via 100.65.0.6 table 100
Only traffic from that subnet is matched. Traffic from your other networks does not change.
The same rule on your equipment:
| Your router or switch | Where the rule is |
|---|---|
| Cisco Catalyst | Switch with one rule |
| Fortinet FortiGate | Deploy with Fortinet |
| Ubiquiti UniFi | Deploy with UniFi |
| MikroTik | Deploy with MikroTik |
| Cisco Meraki | Deploy with Meraki (MX 15.4+) |
2. Check it works
From a machine, reach something it usually talks to, exactly as before:
ping -c3 192.168.2.20 # from the PLC (192.168.1.10)
In the Access Gate console, the flow now appears under the machine's enclave, from its twin address 100.64.1.10.
Access Gate starts in a dry run: it shows what each rule would allow or block, and blocks nothing until you approve the rules. When the dry run shows what you expect, approve them.
At a large manufacturer in North Carolina, a running production line was moved behind Access Gate this way in under a minute, with one rule on the existing Cisco switch. Production kept running.
3. Undo it, if you need to
Remove the rule. On a Linux router:
ip rule del from 192.168.1.0/24 table 100
Traffic goes back to how it was, at once.
What happens to the traffic
PLC (192.168.1.10) [talks to the server 192.168.2.20, as usual]
-> Your router [the rule: from 192.168.1.0/24 -> Access Gate]
-> Access Gate [checks the enclave, shows the PLC as 100.64.1.10]
-> Server (192.168.2.20)
-> and back through Access Gate to the PLC
The PLC still talks to the server's usual address. The server sees the PLC by its twin address, and the reply comes back through Access Gate thanks to the 100.64.0.0/16 route.
Other options
Which traffic the rule covers
The rule covers everything that leaves the machine subnet: machines to IT, and machines to other VLANs.
Traffic coming into the subnet from IT passes through Access Gate when it is sent to a twin address or a machine name: the 100.64.0.0/16 route already handles it. To reach machines by name, see Give your machines easy names.
Machines that talk to each other on the same VLAN, with no router in between, never reach the router. For those, see Redirect traffic on your switches.
Protect only some machines instead of a whole subnet
A destination-based route matches where traffic goes rather than where it comes from. Send one machine's twin address to the gate with a host route, then reach that machine by its twin address or its name. The Cisco form is in Protect one machine instead of a whole subnet.
To move machines one at a time and check each one, see Protect a machine you reach by its name or Protect a machine you reach by its address.
How it works, in network terms
This is source-based routing, also called policy-based routing (PBR): the router decides by the packet's source address, not its destination. On vendor routers it is a route-map or policy route keyed on the source prefix.
Access Gate maps each real address one to one to a twin address on the overlay (a "binat"), here 192.168.1.X to 100.64.1.X. The machine subnet and its twin range must be the same size. Access Gate applies enclave rules, identity and encryption, presents the machine to the other side by its twin address, and translates the reply back to the real machine. The machines keep their own address, gateway and routing.
The twin range for a subnet is set in Access Gate. To set it yourself, see Define the twin range.