Captive Instances¶
The captive instance represents the top of the captive portal hierarchy and allows you to deploy your captive portal to an openNAC web server.


To create a new Captive instance, click on the button Add new to open the corresponding dialogue. The following configurations must be performed in order to get a working Captive instance which will be built over the configurations described on the previous topics:
- Name – The name of the new captive instance being created;
- Portal IP/Domain – The IP address of the server running the Opennac Captive Portal or FQDN. It can be the same IP of the Opennac Core server, if the captive portal will be running on this server along with Opennac Core or the address can be one of a separate server dedicated to run the Opennac Captive Portal.
- IP/Domain to redirect - The IP address or domain of the redirection. This parameter can be used to allow access to the captive portal from an external network or WAN (Ex: a mobile with 4G).
- Installed in core - Check yes if the captive Portal is deployed on openNAC Core server.
- Description – A meaningful description about this new Captive instance.
- Domain – Select a previously created captive domain you want to associate with this new captive instance.
- Theme – Select a captive theme.
- List of IPs that will be redirected to the default page - This parameter can be used to redirect users to the default page and not to the captive portal (Ex: VPN access for downloading the agent only).

Note
When the Captive portal is deployed in another server, we have to generate the API key.
Go to ON CMDB –> Security –> API Key. Click on + Add New
Enter the Captive Portal Server’s IP Address, copy the generated key.

Open the Core CLI and go to /usr/share/opennac/captive-portal/applications/configs/
Edit the file globals.ini with the captive portal’s IP address and the generated key.
vim /usr/share/opennac/captive-portal/applications/configs/globals.ini

To finish the creation of this new captive instance, click on the button Accept.
