3.1.7.1. Captive Instances

In the ON Captive menu, click on the Captive instances section to open its tab, as shown below:

../../../_images/captive_instances_menu.png


To create a new Captive instance, click on the Add new button. The following configurations must be performed in order to get a working Captive instance which will be built over the configurations described below:

../../../_images/captive_instances_add_new.png


  • Name: The name of the new captive instance being created.

  • Captive node IP: The IP address for the Captive node. This field is required.

  • Portal IP/Domain: The IP address or FQDN of the server running the OpenNAC Enterprise Captive Portal. It can be the same IP of the ON Core server if the captive portal will be running on this server along with ON Core, or the address can be that of a standalone server dedicated to running the OpenNAC Enterprise captive portal. This field is required.

  • Installed in core: Set to yes if the Captive Portal is running on the ON Core. Automatically, the Captive node IP will be set to localhost.

  • Description: A meaningful description of 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: The IP or IPs that will be redirected.

  • Enable language selector: Enables the language selector in the Captive portal instance. The shown languages depend on the languages configured inside ON Captive -> Captive themes in the General section, with the corresponding translations in the Translations section. If this selector is not enabled, the language will be the browser language.

../../../_images/language_selector.png


Note

When the Captive portal is in another server, generate the API key.

Go to ON CMDB -> Security -> API Key. If you do not have already generated one, click on Add new.

../../../_images/api_key_menu.png


Enter the Captive Portal Server’s IP Address and copy the generated key.

Open the Core CLI and edit the /usr/share/opennac/captive-portal/application/configs/globals.ini file with the core’s IP address or hostname (onprincipal is recommended) and the generated key.

api.url = "<core_url>"
api.apiKey = "<api_key>"

captive.path = "url_extension_captive_path"
../../../_images/globals_ini.png


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