Triggers and matching
A trigger is the condition that makes a network match. To find out which network you are on, ZestSSH reads the device’s IP addresses, its connection type and, where the system gives it, the Wi-Fi name. It then checks your networks from top to bottom and stops at the first network with a matching trigger. That network’s overrides are what get applied when you connect.
This page covers the trigger types, how they match, how the order decides between networks, forcing a network by hand, and trying a host “as” a network before you rely on it. Networks explains the detect, match and resolve steps this page fits into.
The four trigger types
Section titled “The four trigger types”A network can have one or more triggers. A network matches if any one of its triggers is true, so one “Home” network can match both your Wi-Fi name and your wired subnet.
| Trigger | Matches when… | You provide |
|---|---|---|
| Subnet | any of the device’s IP addresses is inside the range | a CIDR range like 192.168.20.0/24 |
| Wi-Fi network name (Windows and Linux only) | the name of the Wi-Fi the computer is on equals your text exactly | the network name, for example home-net |
| On cellular | the device’s connection counts as cellular | nothing |
| Connection type | the device’s connection is of the type you pick: WiFi, Ethernet, Cellular, VPN or Offline (VPN matches whenever a VPN is up, whatever connection it runs over, and a VPN coming up or going down over the same Wi-Fi or other connection counts as a change of network) | a choice from a list |
Where you add them:
- Phone or tablet: the network editor has Subnet, On cellular and Connection type, and says why there is no Wi-Fi name: “Wi-Fi names are not read on phones: Android and iOS give them only to apps with access to your location, which ZestSSH does not ask for. Tell this phone’s networks apart by subnet, cellular or the connection type.”
- Computer, Simple mode (on a Mac without the Wi-Fi name rule, see below): under Detect when (“any rule matches”), each rule is a row you can type into or remove (Remove trigger), for example IP is in
192.168.20.0/24or Wi-Fi name ishome-net. Buttons add more: Cellular, Ethernet, IP range, Tailscale is up, VPN is up and Wi-Fi name (Another Wi-Fi once there is one). Tailscale is up is an IP range rule for100.64.0.0/10: “Matches when this device has an address in Tailscale’s range, 100.64.0.0/10.” - Computer, from where you are: the Active now card at the top of the networks list has Make a network for this Wi-Fi (or Make a network for this one), which starts a new network with this Wi-Fi’s name, or else the subnet you are on, as its rule.
- Computer, Advanced mode: Add trigger opens a menu with Subnet, Wi-Fi network name, On cellular and Connection type.
Subnet (CIDR): the reliable one
Section titled “Subnet (CIDR): the reliable one”A subnet trigger matches when any IP address the device has right now is inside the range you give. ZestSSH reads IPv4 and IPv6 ranges, and IPv4 addresses written in IPv6 form.
The number after the slash says how many leading bits must match. A /24 compares the first three parts of an IPv4 address; a /16 the first two; a /32 only one exact address.
| CIDR | Matches addresses like | Typical use |
|---|---|---|
192.168.20.0/24 |
192.168.20.1 to 192.168.20.254 |
a home or office LAN |
10.0.0.0/8 |
anything 10.x.x.x |
a large private range, common on VPNs |
10.42.0.0/16 |
10.42.0.1 to 10.42.255.254 |
one site inside a 10.x network |
100.64.0.0/10 |
100.64.x.x to 100.127.x.x |
the range overlay VPNs such as Tailscale hand out |
fd00::/8 |
fd00:... addresses |
an IPv6 unique-local range |
A range that cannot be read (no /prefix, a part over 255, a prefix over 32 for IPv4 or 128 for IPv6) shows “Not a valid CIDR (example: 192.168.10.0/24)” and the network is not saved until you fix it.
Prefer a subnet trigger whenever you can: it is exact, and a stranger’s access point cannot fake your LAN’s addresses the way it can fake a Wi-Fi name.
Wi-Fi network name
Section titled “Wi-Fi network name”A Wi-Fi name trigger matches when the name of the Wi-Fi the device is on equals the text you entered.
Before you rely on it:
- It is read on Windows and Linux only. Android, iOS and recent macOS give an app the Wi-Fi name only with location access, and ZestSSH does not ask for it, so a Mac, a phone or a tablet never reads the name and its editor does not offer the trigger; it says that Wi-Fi names are not read there and to tell networks apart by subnet, cellular or the connection type. A Wi-Fi name trigger that a Mac already had, or that comes with a synced network, never matches there. Use a subnet trigger instead.
- On Windows and Linux, it depends on the system. ZestSSH asks the system for the name; if the system gives none, the trigger does not match. The editor says so: “Your system may ask for location access before it gives ZestSSH the Wi-Fi name. Subnet matching works without it.”
- It is read only while the connection counts as Wi-Fi. A computer on Ethernet and Wi-Fi at the same time counts as Ethernet (see below), and then the Wi-Fi name is not read.
- It can be faked. Anyone can set up an access point with your network’s name. The editor warns about this when a network has a Wi-Fi trigger: “Wi-Fi name matching can be spoofed by a rogue access point. Subnet matching can’t.”
Rule of thumb: use a subnet trigger for anything that matters, and keep Wi-Fi name triggers for convenience on a computer where a wrong match would be harmless.
On cellular
Section titled “On cellular”Matches whenever the device’s connection counts as cellular. There is nothing to set. It suits an “On the road” network that reaches your hosts through a jump host.
Connection type
Section titled “Connection type”A broader form of the cellular trigger. You pick the kind of connection: WiFi, Ethernet, Cellular, VPN or Offline. Combined with other triggers, it lets you write rules like “any Ethernet connection uses the office network”. On a computer’s Simple editor, Ethernet and VPN is up add this trigger for you. VPN matches whenever a VPN is up, also when it runs over Wi-Fi or Ethernet.
How ZestSSH classifies your connection
Section titled “How ZestSSH classifies your connection”A docked laptop can be on Wi-Fi and Ethernet at once; a phone can have cellular up while a VPN is on. ZestSSH turns that into one connection type, in this order:
Ethernet > WiFi > VPN > Cellular > Offline
So a docked laptop on both Ethernet and Wi-Fi counts as Ethernet. Bluetooth tethering counts as cellular. This only affects the Connection type and On cellular triggers and whether the Wi-Fi name is read; subnet triggers look at the device’s addresses whatever the type. A VPN trigger is the exception: it matches whenever a VPN is up, whatever the connection is counted as.
When detection runs again: whenever the connection type changes (you plug in a cable, join Wi-Fi, drop to cellular), about a second after it settles, and every time you connect to a host. A change that keeps the same type, such as moving to another Wi-Fi or a VPN giving you a new address, is picked up at your next connection. On a computer, Re-detect on the Active now card looks again now.
Order: what happens when several networks match
Section titled “Order: what happens when several networks match”Your networks list is checked in order, top to bottom. The first network with a matching trigger wins, and the ones below it are not looked at.
This matters when networks overlap. Suppose you have:
- Office: subnet
10.42.5.0/24 - Corp VPN: subnet
10.0.0.0/8
At your desk, your address is inside both ranges. Because Office is higher, it wins, and Corp VPN applies only when you are on another 10.x address. Put the narrower network above the broader one.
To reorder, drag the networks in the list. On a computer, a network’s Advanced editor also says where it is checked (“Checked 2nd of 4.”) and has Reorder with Move to top, Move up, Move down and Move to bottom.
Default is pinned to the bottom and cannot be moved or deleted: it always matches, and is used when nothing above it does.
On a computer, a network that can never match, because a network above it covers all its triggers, is marked Never matches (“A broader network above this one always matches first.”).
| Situation | Network used |
|---|---|
| One network’s trigger matches | that one |
| Several match | the highest one in the list |
| None match | Default |
| You forced one by hand (phone or tablet) | the forced one |
Forcing a network (phone or tablet)
Section titled “Forcing a network (phone or tablet)”Detection is right almost all the time, but sometimes you want to choose: to try your “away” settings while at home, or on a network you have not taught ZestSSH yet.
On a phone or tablet, the current-network banner at the top of the home screen shows the active network with an Auto or Forced chip. Tap the chip to open Network (“Pretend I’m on a different network”):
- Auto (“Detected automatically”): hands control back to detection. Choosing Auto is always the way out.
- Any of your networks: forces that one. The banner shows a pin and the chip reads Forced.
A forced choice stays after the app restarts. If you force a network and later delete it, ZestSSH goes back to detection.
While a network is forced, every host you connect to uses its overrides until you choose Auto. Forwards that start by themselves still follow the detected network, not the forced one. A computer has no control to force a network.
Trying a host with “Test as this network”
Section titled “Trying a host with “Test as this network””Forcing a network changes it for every host. To check one host against one network (“if Home were active, where would this host resolve, and can I reach it?”), use Test as this network instead.
It is on each network’s row in a saved host’s Networks section (in the host editor). It uses that row’s resolved address, port, username, key and jump route, and changes nothing else. You get two choices:
- Test reachability: only opens a connection to the port, without signing in.
- Test full connection: also signs in with the resolved credentials.
See Per-host overrides for what each row can resolve to.
Common mistakes
Section titled “Common mistakes”A broad network above a specific one. If “Corp VPN” (10.0.0.0/8) is above “Office” (10.42.5.0/24), Corp VPN wins at the office too. Put the narrower range higher. On a computer, the lower one is marked Never matches.
Relying on a Wi-Fi name trigger on a phone. A phone never reads the Wi-Fi name, so it never matches there. Use a subnet trigger.
Wrong prefix length. 192.168.20.0/24 matches the whole 192.168.20.x LAN; 192.168.20.20/32 matches only that one address. If a network never seems to match, check the prefix.
Forgetting you forced a network. A forced network stays across restarts. If a host keeps resolving oddly, look at the banner: if it says Forced, tap it and choose Auto.
Next steps
Section titled “Next steps”- Per-host overrides: what a network can change for a host once it matches.
- Networks: the big picture.
- Jump hosts: the routes an override can add or change.
- Port forwarding: starting a forward on one network with Run on network….