Sophos Firewall (SFOS)
Connect Sophos Firewall to Hotspotly with a static WAN IP and RADIUS; the RADIUS server, speed groups and captive portal page are written through the XML API.
This guide connects a Sophos Firewall (XGS, XG and virtual appliances running SFOS) to Hotspotly. Sophos does not build a tunnel to Hotspotly: RADIUS requests come from the device's static WAN IP address, and Hotspotly only accepts registered addresses. The panel writes most of the setup through the Sophos XML API: the RADIUS server, speed groups (QoS policies and user groups) and the captive portal redirect page. The firewall rule and zone selection stay with you.
In short
My Devices → Add Device → Sophos Firewall (SFOS) → static IP, Guest network gateway (LAN IP) (the Sophos guest interface IP) → Create device. On the device page, save and test the Sophos XML API account, then click Write missing objects on the Sophos Firewall setup card. Finally, turn on web authentication in the guest rule on Sophos and use Test connection on the device page.
Prerequisites
| You need | Details |
|---|---|
| SFOS | Hotspotly's XML API requests follow Sophos's published documentation for SFOS 19.x–21.x. |
| Static WAN IP | A static public IP from your internet service provider that belongs only to this venue. It does not work with CGNAT or a changing IP. |
| Administrator account | An SFOS administrator account with Administration write permission for the XML API. |
| Server method | The Public RADIUS (tunnel-less) method must be enabled on the server. If it is not, the wizard says so before you fill anything in. |
| Hotspotly account | A free device slot in your plan. |
1. Add the device
- On My Devices, click Add Device and choose Sophos Firewall (SFOS).
- For How does your device reach the internet? choose a static IP and enter the Sophos WAN address. If the same public IP is registered for another venue, the record is refused with a clear message.
- In Guest network gateway (LAN IP), enter the IP address of the Sophos guest interface. The login form is sent only to the Sophos login page at this address (
:8090/login.xml); the wizard creates the hotspot with this gateway. - Click Create device. The wizard shows RADIUS server, 1812 / 1813, RADIUS secret, External portal address (
…?gw=sophos) and Allowed hosts (walled garden) with copy buttons.
The secret is shown only once
The RADIUS secret is not shown in the panel again after this screen. The Sophos card writes the secret to the device itself, so you do not have to copy it; if you plan a manual setup, keep it somewhere safe. If needed, renew it with Regenerate secret on the device page.
2. WAN IP and XML API account
Open the device page (My Devices → Detail) and use the Connection settings card.
- The WAN IP addresses section already lists the WAN address you entered in the wizard. If you have a backup line, enter it in IP address, tick This address is a static IP assigned by the internet service provider and belongs only to this venue. and click Add. Only statically declared addresses become RADIUS clients.
- On Sophos, enable API access and add Hotspotly's outbound IP address to the allow list. In the official SFOS 21.0 documentation this setting is under System > Backup and firmware > API; the menu name can differ by SFOS version. Support can tell you Hotspotly's outbound IP address.
- In the Vendor management API section, choose Sophos Firewall (XML API) as Connection profile. The Target address is the WAN address, and the Port defaults to 4444. Enter the SFOS administrator account in Username / client ID and API key / password.
- If Sophos uses a self-signed management certificate, fill in Certificate fingerprint (SHA-256), or use Use this fingerprint after the test (compare the fingerprint with the one on the Sophos screen).
- Click Test connection; Connection succeeded should appear.
3. Hotspot and gateway
The wizard creates the hotspot with the address in Guest network gateway (LAN IP). If you add another hotspot (Hotspots → Add Hotspot, Sophos as Device), the Gateway field is required: enter the IP address of the Sophos guest interface; if it is empty, guests cannot log in.
4. Sync with the Sophos card
The Sophos Firewall setup card on the device page shows the
RADIUS server (authentication / accounting), the Group attribute (Filter-Id), the
Login address (Sophos captive portal), the Hosts allowed before login and the Speed groups.
The card shows no secrets.
- If there is more than one hotspot, pick the right one in Hotspot.
- The notices at the top of the card list missing values; fix them first (see the table below).
- Read the device state with Check. The panel only sends read requests to Sophos.
- Click Write missing objects. The panel writes, in order, the RADIUS server (including the secret), the QoS policies, the user groups and the captive portal redirect page. It deletes nothing and does not rewrite unchanged objects.
If you need to write the RADIUS secret again (for example after changing the RADIUS server on Sophos by hand), use Write the RADIUS secret to the device again.
The portal page applies to the whole device
On Sophos the captive portal appearance is one for the whole device. The redirect page the card writes replaces the login page of every zone that uses web authentication and shows the portal of a single hotspot. Keep this in mind if you also use web authentication for staff or other purposes.
5. Manual steps on Sophos
Zone and rule names are specific to each device, so these two steps are not done from the panel:
- In the firewall rule from the guest zone to the internet, turn on web authentication for unknown users.
- Under the authentication services, select the Hotspotly RADIUS server for the captive portal.
The panel names these settings Rules and policies > Firewall rules and Authentication > Services. Menu names can differ by SFOS version; see Sophos's own documentation for details.
Automatic setup: plan, apply, undo
Mode: Automatic (partial). The Automatic setup card on the device page uses Sophos's official XML API (documented for SFOS 19.0 to 22.0; minimum version 19.0) and, unlike the older sync card above, shows a plan first, needs your confirmation and can undo exactly what it created. Speed groups (QoS) stay on the Sophos card.
- Save the account: Administrator name and Administrator password of an SFOS administrator with write access to Authentication and Web authentication. Use the address
https://<WAN IP>:4444. If the management certificate is self-signed, fill in Management certificate SHA-256 fingerprint (self-signed certificates). Enable the API on Sophos and add Hotspotly's outbound IP to its allow list first. - Click Create plan. Only reads are sent; the table shows a RADIUS server named
hotspotly-<8 hex>-radiusand a Captive portal page template. - If you already have your own captive portal page, it is shown as a conflict. It is replaced only if you accept it, and restored when you undo.
- Confirm, then apply. The RADIUS secret is written to Sophos and never shown. Verify reads the settings back and checks the RADIUS path.
- Create undo plan removes the RADIUS server and restores your previous page. If you changed either one by hand after the setup, it is left alone and reported as changed.
Still manual afterwards: Web authentication for unknown users in the guest firewall rule and Selecting the Hotspotly RADIUS server under the captive portal authentication services, because zone and rule names belong to your device.
| Symptom | Cause | Fix |
|---|---|---|
| "Credential invalid" | Wrong administrator name or password | Save the account again |
| "The account role is not sufficient" | API disabled, caller IP not on the allow list, or read-only | Enable the API and add Hotspotly's outbound IP; use a writing role |
| "Could not verify the certificate" | Self-signed management certificate | Paste the SHA-256 fingerprint |
| "Another portal is already configured" | A RADIUS server with the same tagged name exists | Rename or remove it on Sophos, then create a new plan |
What was verified: the requests were tested only against a simulator built from Sophos's published API pages. The wrapper of the delete request is an assumption; the field test on a real firewall is listed in the operations notes.
HTTPS login certificate
The guest form goes to Sophos's own login page (port 8090). Hotspotly installs a valid certificate automatically for this page through the XML API:
- Once the XML API account is saved and Test connection succeeds, the Automatic setup card on the device page runs on its own (Management API access → Test login).
- On Sophos this certificate setting is shared with the web admin console: once the certificate is installed, the admin console also presents it. The panel updates the stored fingerprint itself once the device actually presents the new certificate.
- Renewal is automatic. If a renewal fails, login temporarily returns to the previous address.
- If the card shows HTTPS is off: login works with http-chap, the HTTPS feature is not enabled on your account; login continues over HTTP and the guest browser may show a warning. Contact support to have it enabled.
Test with a guest device
On the device page, Test connection shows each step from real records (including RADIUS client record, Portal redirect and login and RADIUS record from the device). The last steps complete after the first guest login:
- Connect a phone to the guest network. Sophos should redirect the browser to the Hotspotly login page.
- Sign in with a login method. The form is sent to the Sophos login page and internet access opens.
- In the panel, check that the session appears on the Sessions page.
The Sophos login page answers with an XML document; after signing in, the browser may not return to the Hotspotly success page by itself. If internet access is open, the login is complete.
Session, speed and disconnect behaviour
| Topic | On Sophos |
|---|---|
| Accounting | Yes (1813). The access log is built from RADIUS accounting. |
| Session disconnect (CoA) | No. Data quota and the concurrent device limit cannot be enforced mid-session; the time limit is sent as the RADIUS Session-Timeout. A guest whose quota is used up is stopped at the next sign-in. |
| Speed limit | The bandwidth profile is sent as a hs-rate-<down>-<up> group in Filter-Id; Sophos enforces it with the QoS policy of the user group with the same name (KB/s). A profile without a speed falls into the hotspotly-nolimit group. Run Write missing objects again after adding a profile or changing its speed. |
| Syslog and access logs | Syslog is not collected from devices without a tunnel. Access log records come from RADIUS accounting (no NAT or DHCP records). You do not need to set a syslog server on Sophos. |
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The method shows "not ready" in the wizard | Public RADIUS is not enabled on the server. | Tell the platform administrator; the wizard shows the missing step. |
| This IP address is already registered on another device. Two venues behind the same public IP cannot be told apart; get a static IP or choose a tunnel method. | The same public IP is registered for another venue. | Enter the venue's own static IP. |
| The hotspot settings have no gateway IP address. Enter the IP address of the Sophos guest interface; the login form is sent only to this address. | The hotspot gateway is empty. | Follow Hotspot and gateway. |
| The platform RADIUS server address is not set. Contact the platform administrator. | The platform public RADIUS address is not set. | Tell the platform administrator (the wizard also shows the method as "not ready"). |
| This device has no RADIUS secret or it is too long for Sophos. Enable the device again from the external portal guide. | The device has no RADIUS secret. | Create one with Regenerate secret on the device page, then Write missing objects. |
| Sophos does not allow API requests from this IP address. Add Hotspotly's IP address under Backup & firmware > API. | The Sophos API is closed to Hotspotly's IP. | Add Hotspotly's outbound IP address to the API allow list on Sophos. |
| The Sophos administrator account was rejected. | The admin name or password is wrong. | Enter the account again in the connection settings. |
| The Sophos XML API was unreachable or the certificate could not be verified. | Port 4444 on the WAN IP cannot be reached, or the certificate could not be verified. | On Sophos, allow management access from the WAN side (4444) for Hotspotly's IP; pin the fingerprint for a self-signed certificate. |
| There is no Sophos XML API target (WAN IP). | No WAN IP is registered. | Follow WAN IP and XML API account. |
| The guest sees an error on the portal and cannot sign in | The Sophos redirect did not carry the client MAC address; Hotspotly rejects logins without a MAC for security. | Make sure the redirect page is current with Write missing objects on the card; if the problem persists, contact support with your SFOS version. |
| The guest signs in but RADIUS rejects them | Sophos leaves through an address other than the one in the wizard (for example a backup line). | Add the backup line with the static declaration. |
Known limits
- Sophos's documentation does not state the parameter name the captive portal redirect uses for the client MAC address. The Hotspotly page reads the known candidate names; without a MAC the login is rejected.
- The captive portal page applies to the whole device (one hotspot).
- There is no IPsec tunnel option for Sophos; it connects only with a static WAN IP.
- A guest arriving with an unknown speed group name falls into the Sophos default group; run the sync after a profile change.
- Sophos may add users who sign in through RADIUS to its own user table; one-time guest names can pile up over time.