The rules shared by every kind of tunnel

Before going into the individual tabs, a few rules hold for WireGuard, IPsec and OpenVPN alike.

Before going into the individual tabs, a few rules hold for WireGuard, IPsec and OpenVPN alike.

The tunnel is an interface. Each WireGuard profile becomes an interface wg0, wg1…; each IPsec tunnel an interface ipsec0, ipsec1…; each OpenVPN tunnel an interface ovpn0, ovpn1…. The console chooses the name and never changes it. To the firewall it is an interface like any other: you put it in a zone from Zones and rules → Zones, and that zone’s policies decide what comes in from the tunnel and what may reach the other site. As long as the interface is in no zone, the traffic arriving from the tunnel is dropped (only the replies to connections opened from this side get through). A dedicated zone is usually best, for example sites (for the other sites), with its forward matrix towards lan.

Networks never overlap. The remote networks of an active tunnel may not overlap the networks attached to the appliance (the interfaces and the VLANs, including those with an address from DHCP) nor the networks of another active tunnel, of any kind. A disabled tunnel is exempt: you can keep a spare profile with the same networks as an active one. The check also works the other way round: Network and uplinks → Interfaces and Network and uplinks → VLANs refuse an address that would overlap an active tunnel.

Saving brings the tunnel up, “Apply” opens the ports. Saving a profile configures and starts the tunnel at once (it restarts it only if something changed; the other tunnels are not touched). The firewall rules that open the tunnel’s ports to the other site, instead, are part of the ruleset: after the save the header shows “Unapplied changes”, and the ports open when you press “Apply” and confirm within 60 seconds. The same goes for moving the interface into a zone. At the bottom of every form, the “Effect of saving” panel reminds you of it.

The other site is identified by its address, resolved at save time. If you give the other site as a name (branch.johnsmith.test), the console resolves it when you save, and the firewall opens the ports only to the addresses found at that moment. If the other site’s address changes, save the profile again and apply the firewall. The two kinds differ only when the name does not resolve: a WireGuard profile is saved all the same and its port opens to any address (see “The listen port and the firewall”), an IPsec tunnel is refused.

For the technician No NAT exemption to configure: the wan zone’s masquerade acts only on traffic leaving through the wan’s interfaces, and traffic towards wgN, ipsecN or ovpnN never meets it. Leave “Masquerade (SNAT)” off in the zone holding the tunnel, so the other side sees the clients’ real addresses. The routes to the remote networks always point at the tunnel’s interface.

LET’S TALK INFRASTRUCTURE

Control starts with a conversation.

Tell us about your infrastructure. Let’s start with what you actually need.

Talk to an engineer