Situation
John Smith Ltd has a warehouse at another site. The warehouse has a FortiGate, installed and managed by an outside technician, which speaks IPsec but not WireGuard. The data:
| Headquarters (this Argos) | The warehouse (FortiGate) | |
|---|---|---|
| Public address | 203.0.113.10 | 198.51.100.60 (warehouse.johnsmith.test) |
| Internal network | 192.168.10.0/24 | 192.168.60.0/24 |
The headquarters offices must reach the warehouse’s PCs and printers; from the warehouse only the headquarters ERP (192.168.10.41, web interface on port 8080) must be reachable.
In Argos every IPsec tunnel is a profile in VPN → VPN IPsec. The tunnels
are always route-based: each profile has an interface of its own
(ipsec0, ipsec1…) and the routes to the remote networks go through it. If
the tunnel is down, the traffic for the warehouse is dropped, it never goes out
to the internet in clear. The interface joins a zone like any other, and the
zone decides what gets through: here the sites zone (for the sites), the same
as the WireGuard tunnel to the branch (Connecting two Argos sites with
WireGuard).
The base case uses IKEv2 with a pre-shared key (PSK). Two variants follow: authentication with certificates and the peer with a dynamic address.
What you need
- An agreement with the warehouse’s technician on: public addresses, the networks of the two sides, the IKE version (IKEv2: the FortiGate supports it), the encryption proposals, and a secure channel for the pre-shared key (a phone call, a separate message: never together with the parameters).
- strongSwan installed on the appliance (package
charon-systemd, installed with Argos). If it is missing, the form says so with “The IPsec VPN service is not installed (package charon-systemd): the tunnels cannot start.”. - The two sides must not use the same internal network, nor a network already carried by another active tunnel.
- If the appliance sits behind a router with NAT: UDP ports 500 and 4500 forwarded to the appliance (see “If something goes wrong”).
Steps: pre-shared key and IKEv2
The profile
-
Open VPN → VPN IPsec and press “Add an IPsec tunnel” (the + in the list’s bar). “VPN IPsec / New tunnel” opens.
-
In the “Tunnel” block fill in:
- “Description”:
Warehouse; - “Remote gateway”:
warehouse.johnsmith.test(the address works too, 198.51.100.60; never the port). A name is resolved on saving; - “Start the tunnel”: on (this side opens the tunnel; off, it only answers);
- “IKE version”: “IKEv2”;
- “Active”: on.
- “Description”:
-
In the “Authentication” block:
- “Method”: “Pre-shared key”;
- “Pre-shared key”: press “Generate a key” (the icon in the field), then “Copy the key”. The note warns: “At least 20 characters. Generate one and copy it now: once saved it is never shown again.”;
- “Local identity”: leave it empty. The field shows in grey the appliance’s public address (203.0.113.10), which becomes the identity on saving;
- “Remote identity”: leave it empty: it becomes the gateway,
warehouse.johnsmith.test. The FortiGate will have to present itself with that name: the sheet of step 8 tells the technician how.
-
In the “Networks” block:
- “Local networks”: it is already filled in with the networks of the lan
zone (
192.168.10.0/24); remove those the warehouse must not see; - “Remote networks”: type
192.168.60.0/24and press the + (“Add network”); - “Traffic selectors”: “One SA per network pair”. It is what most firewalls expect, and the sheet will tell the technician to put the two networks in phase 2 (192.168.60.0/24 ↔ 192.168.10.0/24). If the technician prefers to leave the 0.0.0.0/0 selectors in phase 2, as is often done on a FortiGate in interface mode, choose “Any to any (route-based peer)” instead: the two choices must match.
- “Local networks”: it is already filled in with the networks of the lan
zone (
-
In the “Cryptography” block, “Proposals”: “Compatible (AES-256, SHA-256, DH 14)”. It is accepted by every common device, the FortiGate included. Choose “Modern (AES-256-GCM, SHA-384, DH 20)” only if the other side supports it; “Custom” only if the technician requires specific algorithms.
-
Press “Create tunnel”. “IPsec tunnel applied” appears and the console goes back to the list, with the row
ipsec0. With the tunnel open, the title is “VPN IPsec / ipsec0 · Warehouse” and the form shows the warning “ipsec0 is in no zone: the traffic from the tunnel is dropped until a zone holds it (Zones and rules → Zones).”.


The save has already loaded the tunnel into strongSwan; the firewall’s ports towards the gateway open when you apply (step 13).
The parameters for the other side
- Open the tunnel (a click on its row) and press “Parameters for the other side” (the icon in the detail’s bar). “Parameters for the other side — Warehouse” opens.
- In “Other side’s device” choose “Fortinet FortiGate” (the other entries are
“Generic”, “MikroTik RouterOS”, “DrayTek Vigor”, “Sophos Firewall”,
“pfSense”, “AWS Site-to-Site VPN”, “Azure VPN Gateway”, “strongSwan” and
“Another Argos”). The sheet uses the algorithms’ names as Fortinet writes
them (for “Compatible”: “Phase 1: aes256 / sha256 / 14”, the same in phase
2) and adds the note for the FortiGate: “FortiGate: set the phase 1 Local ID
to the identity above (warehouse.johnsmith.test; CLI: set localid-type
address — or fqdn for a name — and set localid). On auto it sends its
interface’s address, which behind NAT is not its public one. …”. Here the
identity is a name, so
set localid-type fqdnandset localid warehouse.johnsmith.test. For a vendor other than “Generic”, “Another Argos” and “strongSwan” the dialog reminds you: “Names as in the vendor’s documentation: check them against your firmware.”. - Press “Copy” and send the sheet to the warehouse’s technician. Pass on the pre-shared key separately: the sheet does not contain it.


The sheet is written from the other side’s point of view: its “Remote gateway” is this Argos (203.0.113.10), its “Local networks” are your remote networks (192.168.60.0/24), and so on. If a question mark appears on a line, that device does not offer the chosen algorithm: go back to “Compatible”.
The tunnel’s zone
-
Open Zones and rules → Zones and choose the
siteszone. In “Interfaces” switch onipsec0. If the zone does not exist yet, create it with “Add zone” as in the branch scenario: “Name”sites, “Inbound policy” and “Forward policy” “Drop”, “Masquerade (SNAT)” off, “Accept” next to “LAN” in the “Forwarding matrix”. -
The matrix lets everything that comes from the zone go to the LAN, but the warehouse must reach only the ERP. In “Forward rules” add two rules, in this order, each with “Add rule” and then “Add” in the dialog:
- “Destination zone” LAN, “Action” “Accept”, “Protocol” TCP, “Ports”
8080, “Source”192.168.60.0/24, “Destination”192.168.10.41, “Comment”Warehouse: ERP; - “Destination zone” LAN, “Action” “Drop”, “Protocol” “Any protocol”,
“Source”
192.168.60.0/24, “Comment”Warehouse: nothing else.
The rules are read in order and the first that matches decides: the ERP gets through, the rest of the warehouse stops at the second one, and the branch (192.168.50.0/24), which neither of them describes, follows the matrix as before.
- “Destination zone” LAN, “Action” “Accept”, “Protocol” TCP, “Ports”
-
Press “Save zone”. The lan zone has “Forward policy” “Accept”: the offices already reach the warehouse without other rules.
Warning Do not put the tunnel in the lan zone for convenience: whoever is on the other side would reach the whole LAN, and SSH and the appliance’s console too, which always answer on the lan zone. A dedicated zone decides what the warehouse sees.
Apply
- In the header open the firewall button (“Unapplied changes”) and choose “Apply”; in the “Keep the new ruleset?” dialog press “Confirm” within 60 seconds.
Now the tunnel’s “State” block says “The firewall opens IKE and ESP to 198.51.100.60 only — the gateway, resolved when the tunnel is saved; it holds once the firewall is applied.”. Once the technician has configured the FortiGate, the tunnel comes up by itself: this side starts it, and restarts it if it drops. With auto-negotiate on, the FortiGate starts it too, and that is fine.
For the technician The engine is strongSwan (
charon-systemd, unitstrongswan.service); Argos owns only/etc/swanctl/conf.d/argos.conf(0600, the pre-shared key written in hexadecimal) and its interfaces. Each profile is an XFRM interfaceipsecNwith its ownif_idand MTU 1400; the routes to the remote networks areip route replace <network> dev ipsecN src <local address>, present even with the tunnel down, when the interface drops everything. The connections that initiate havestart_action = trap|start,close_action = trap,dpd_delay = 30swithdpd_action = restart,unique = replaceandmobike = no. Ininput, ahead of the zones, the firewall acceptsip saddr 198.51.100.60 udp dport { 500, 4500 }andmeta l4proto espfrom the same address; inforwardit clamps the MSS of what leaves throughipsecN. The state comes fromswanctl --list-sas --pretty. From the shell:swanctl --list-sas ip -d link show ipsec0 ip route | grep ipsec0 journalctl -u strongswan --since "-30min"
Variant: authentication with certificates
Instead of the pre-shared key, each side presents a certificate signed by a CA the other side knows. In the “Authentication” block choose “Method” “Certificate” and, in “Certificate of this appliance”, one of the three sources.
“Issued by this Argos”. The appliance has an IPsec CA of its own, separate from the console’s. On saving it issues a certificate for the local identity and renews it by itself. You hand the CA to the other side, with “Download the CA” or “Copy the CA” (it is also at the bottom of the “Parameters for the other side” sheet), and they import it as a trusted CA.
“Signing request for the other side’s CA”. The certificate is signed by the other side’s CA, but the private key is made on the appliance and never leaves it. Save the tunnel first (“Save the tunnel first.”): while the certificate is missing, the form stays open on the tunnel after the save instead of going back to the list. Then press “Create the request” and “Copy the request”; send the request to the technician, who signs it with their CA; paste the certificate they send back into “Signed certificate (PEM, intermediates after it)” and press “Install the certificate”.
“Imported PKCS#12”. The technician gives you certificate and key in a
.p12 or .pfx bundle. Save the tunnel (the form stays open on it, as for
the signing request), choose the file in “PKCS#12 bundle
(.p12, .pfx)”, type the “Bundle password” and press “Import the bundle”. The
password is only used to open the bundle and is never stored.
In all three cases:
- in “CA of the other side” you paste, in PEM format, the CA that signs the FortiGate’s certificate (root first, then any intermediates);
- the “Remote identity” left empty is the gateway, and the FortiGate’s certificate must then carry it, as a name or as an address;
- until this appliance’s certificate is there, the list says “Waiting for its certificate” and the form “No certificate yet: the tunnel waits for it.”.
With “Fortinet FortiGate” the sheet adds the note on certificates: this Argos’s CA must be imported as a CA certificate and named in a PKI peer, and switching phase 1 to Signature puts the Local ID back to auto, which must be set again.


“Re-create the CA” (with the source “Issued by this Argos”) is only for a damaged CA: Status says so with “The IPsec CA is damaged (its certificate and key do not match): re-create it”. Every certificate the CA issued is issued again and every peer must import the new CA.
The System status → Status page warns when an IPsec certificate is about to expire (“IPsec certificate of ipsec0 expires in 20 days”) or has expired. The daily pass renews the certificates issued by the appliance’s CA and sends an e-mail for those that expire and that Argos cannot renew by itself.
Variant: peer with a dynamic address
If the warehouse has no fixed public address, it is the FortiGate that calls Argos, and Argos recognises it by its identity.
- In the “Tunnel” block leave “Remote gateway” empty. The list shows “Peer with a dynamic address” and “Start the tunnel” switches off: “A peer with a dynamic address is never called: this side waits for it.”.
- “IKE version” must be “IKEv2”: IKEv1 cannot wait for a dynamic peer.
- “Remote identity” becomes required and must be a name, not an address: for
example
warehouse.johnsmith.test. The technician sets the same name as the FortiGate’s Local ID. - The “State” block says: “A peer with a dynamic address: UDP 500 and 4500 are open to any address while this tunnel waits for it; the peer gets in only with its identity and credentials.”. ESP travels encapsulated in UDP, so nothing else is needed.
Two waiting tunnels cannot wait for the same identity. Use a long pre-shared key or, better, certificates: the ports are open to everyone.
Ports open to the gateway only
With a “Remote gateway” given, the firewall opens UDP 500 (IKE), UDP 4500 (NAT traversal) and ESP only to the addresses the gateway resolved to at the tunnel’s last save. You do not have to add services to the wan zone. Therefore:
- if the gateway is a name and its address changes, open the tunnel, press “Save tunnel” and apply: the name is resolved again;
- a name that does not resolve prevents saving an active tunnel;
- while an IPsec tunnel is active, no publication can forward UDP 500 or 4500, and no zone service can open them to any source (a service with its own sources is still allowed; while a tunnel waits for a dynamic peer the ports are already open to everyone and the check does not apply).
Verification
- In VPN → VPN IPsec the tunnel’s row says “Connected”. In the detail, the “State” block shows “Connected”, for how long and, if there is a NAT in between, “through NAT (UDP 4500)”; below, “Received … · sent …”.
- In System status → Status, card “Gateways and tunnels”, under “VPN
tunnels”
ipsec0is “Connected” with the bytes received and sent; in the “Services” card “VPN IPsec” is active. - In Events and diagnostics → Diagnostics, tool “Ping”, try an address at the warehouse that answers ping (for example the FortiGate’s internal interface, 192.168.60.1, if the technician has allowed ping there).
- From an office PC reach a PC or a printer at the warehouse. Ask the
technician to open
http://192.168.10.41:8080from a warehouse PC, and to try another LAN address (for example the NAS, 192.168.10.20): it must be dropped. - In Events and diagnostics → Firewall, filtering by
sites, you see the lineszone-sites-to-lan-rule-2of what the second rule of step 11 dropped (the number is the rule’s position in the list).


If something goes wrong
The account of the negotiation is in Events and diagnostics → System: type
strongswan in the “Unit or message” filter. The upper-case keywords in
strongSwan’s lines almost always give the reason.
The tunnel stays “Connecting” and the log says NO_PROPOSAL_CHOSEN. The proposals do not match: the two sides must offer the same algorithms, in both phases (the phase 2 PFS group too). Choose “Compatible” and ask the technician to copy exactly the “Phase 1” and “Phase 2” lines of the sheet for FortiGate.
The log says AUTHENTICATION_FAILED. Key or identity. Check that the
pre-shared key is identical (if you generated it again, the old one no longer
holds; typing a new one replaces the saved one, leaving the field empty keeps
it). Then the identities: the one the FortiGate sends must be your “Remote
identity” (warehouse.johnsmith.test), and the other way round. The most
common case: the FortiGate’s Local ID was left on auto, and the FortiGate
presents itself with its interface’s address instead of the name. It must be set
by hand as the sheet says (set localid-type fqdn, set localid warehouse.johnsmith.test). A firewall behind a NAT often presents itself with
its private address: set both identities explicitly on the two sides.
The log says TS_UNACCEPTABLE. The networks do not match: one side’s “Local networks” must be exactly the other side’s “Remote networks”, and the selectors’ mode must be the same (“One SA per network pair” against the two networks in the FortiGate’s phase 2, “Any to any” against 0.0.0.0/0). On AWS the sides’ names are swapped: the sheet for AWS says so.
The tunnel does not start and the appliance sits behind a router with NAT. On the router forward UDP 500 and UDP 4500 to the appliance, above all if it is the FortiGate that calls. NAT traversal is automatic: when there is a NAT in between, IKE and ESP travel over UDP 4500, and the “State” block says so with “through NAT (UDP 4500)”. The default local identity is already the public address, not the interface’s private one.
The tunnel is connected but the traffic does not get through.
ipsec0is in no zone (the warning in the form), or the zone does not open what is needed.- On the FortiGate the policy letting traffic through between the tunnel and its LAN is missing, or the static route to 192.168.10.0/24 on the tunnel’s interface (in interface mode it must be added by hand).
- The server you are looking for does not use its side’s firewall as its gateway.
Some applications hang on large transfers. The tunnel’s interface has MTU 1400 and Argos reduces the MSS of the TCP connections leaving into the tunnel, so TCP does not suffer. If the problem persists, ask the technician to limit the tunnel’s MSS or MTU on their side too.
“The interface ipsec0 is missing: save the tunnel again.” The tunnel’s interface is gone (for example after a manual intervention): press “Save tunnel”.
“The IPsec VPN service could not be asked for the tunnel’s state.” The service does not answer: check “VPN IPsec” in the “Services” card of System status → Status.
“Not a network of this appliance (an interface, a static route, or another tunnel’s remote network)”. One of the “Local networks” is not behind this appliance: correct it.
“A local network overlaps a remote one” or “Overlaps a network attached to this appliance”. The two sites use networks that overlap: one of the two must be renumbered, because Argos does not translate a tunnel’s networks.
“Overlaps another active tunnel (WireGuard or IPsec)”. That remote network is already carried by another active tunnel.
“Another active tunnel uses this gateway”. There is already an active tunnel to the same gateway: add the networks to that one.
“The gateway’s name does not resolve: the firewall cannot be opened to it”. The name typed in “Remote gateway” has no address: correct it or use the address.
“A UDP publication forwards port 500 or 4500: it would take the IKE traffic” or “A zone service opens UDP 500 or 4500 to any source (Zones and rules → Zones): give it a source or remove it”. Move the publication or limit the service.
“At least 20 characters”. The pre-shared key is too short: use “Generate a key”.
The other side speaks only IKEv1. Choose “IKEv1 (compatibility)”. Argos uses main mode only, never aggressive mode, and shows the phase 1 and phase 2 lifetimes (“Phase 1 lifetime (s)”, “Phase 2 lifetime (s)”), which with IKEv1 often have to match on the two sides (28800 and 3600 are the most common). In IKEv1 phase 1 does not accept AES-GCM: the error “Not negotiable with IKEv1 (no GCM or ChaCha20 for phase 1, no Curve25519): choose the Compatible proposals” points it out.
The other side’s firewall never answers by itself: the tunnel only comes up when it starts it. On some devices IPsec must also be allowed on the firewall’s WAN zone (on Sophos: Administration › Device access). The sheet for that device reminds you.
The other side is an Argos too. Choose “Another Argos” in the sheet: it
contains an [argos-ipsec] block that the other Argos reads with “Import” (the
list’s bar of VPN → VPN IPsec). The imported tunnel must be completed with
the pre-shared key. Between two Argos WireGuard is simpler: see Connecting two
Argos sites with WireGuard.