.. _configuring-cwp:


Configuring Captive Web Portal
===============================

A **Captive Web Portal** (**CWP**) is a ‘landing’ web page, often used for info
or authentication. The portal intercepts observed packets until the user is
authorized to launch browser sessions. The user is granted conditional Internet
or Network access once Authentication, EULA Agreement, Payment, or other valid
credentials have been completed.

Enable The Captive Web Portal
-----------------------------

#. Go to **Policy** in the top panel
#. Go to **Enforcement Policy** in the left Policy panel
#. Select the desired **Enforcement Policy**
#. Under **General > Status** select **Enabled**
#. Under **Enforcement Options > Captive Web Portal** tab
#. Select **Default CWP Page** under **Redirecting to** section
#. Click **Update**
#. Click **Apply**

Configuring Proxy Server Exceptions
-----------------------------------

Captive portals may not be able to provide proper redirection if internal hosts
on the network are configured to use a proxy server.  By making the proper
proxy exceptions on your proxy server, this will ensure captive portal
redirection functions properly.

In the examples below, replace ``x.x.x.x`` with the IP of the Genian ZTNA Policy
Server, and add to your existing proxy server configuration.

.pac example
''''''''''''

.. code-block:: none

   function FindProxyForURL(url, host) { if (isInNet(host, "x.x.x.x",
   "255.255.255.255")) return "DIRECT"; else return
   "PROXY proxy.company.com:8080"; }

.dat example
''''''''''''

.. code-block:: none

   function FindProxyForURL(url, host)
   {
   if (isPlainHostName(host) ||
   isInNet(host, "x.x.x.x", "255.255.255.255"))
   return "DIRECT";
   else
   return "PROXY proxy.company.com:8080";
   };

Customizing Messages
--------------------

Default messages can feel bland or uninformative. While they get straight to
the point, a default message might not provide enough information as to why a
user is blocked from the network. Other times, there may be scheduled
maintenance that will cause downtime on the network, an important update that
needs to be downloaded, or a new policy in place that people need to be
informed about. Thus, a Custom Web Portal Message is the perfect solution.

Add a Custom Web Portal Message
'''''''''''''''''''''''''''''''

#. Go to **Policy** in the top panel
#. Go to **Policy > Enforcement Policy** in the left Policy panel
#. Click desired **Enforcement Policy** name
#. Find **Enforcement Options > Captive Web Portal** section
#. Select desired **Redirecting to** option
#. Enter **User Message** to be displayed on **CWP** (*This message is
   displayed when access is denied*)
#. Click **Update**

Managing Notice
---------------

Notices are bulletin style messages used for making employees or customers
aware of important updates, events, or factors regarding the network. Notices
are usually longer statements describing one or more topics, whereas messages
are used for short, direct statements about why a user is blocked or what needs
to be done to gain access to the network.

Create a Notice
'''''''''''''''

#. Go to **Preferences** in the top panel
#. Go to **Captive Web Portal > Notice** in the left Preferences panel
#. Click **Tasks > Create**
#. If a **Posting Period** is required, click on **Checkbox** and select a
   **date** and **time**
#. Enter **Subject**
#. Create **Content**
#. Select the **Type** (*HTML, Text, or Markdown*)
#. Click **Save**

Delete a Notice
'''''''''''''''

#. Go to **Preferences** in the top panel
#. Go to **Captive Web Portal > Notice** in the left Preferences panel
#. Click **Checkbox** of **Notice** to be deleted
#. Click **Tasks > Delete**
#. Click **Ok**

Managing Custom Buttons
-----------------------

You can create **Custom Buttons** that get inserted onto the **Captive Web
Portal** page to redirect users to other web pages.

.. list-table::
   :widths: 3 12
   :header-rows: 1

   * - Button type
     - Description
   * - Hyperlink
     - The current tab will be redirected to a specific URL.
   * - Pop-up window
     - Open a specific URL in a new window
   * - Agent Try Menu
     - Open a specific URL in a new window once you click the Agent tray menu.
   * - Webpage
     - Go to the information collection page.
   * - Download
     - Download the uploaded file.


Create a Button
'''''''''''''''

#. Go to **Preferences** in the top panel
#. Go to **Captive Web Portal > Custom Button** in the left Preferences panel
#. Click **Tasks > Create**
#. Add a **Name** and **Description** for the button
#. **Upload** a custom **Image** to use with the button (*Optional*)
#. Add a **Hyperlink** for the button
#. Click **Save**

Delete a Button
'''''''''''''''

#. Go to **Preferences** in the top panel
#. Go to **Captive Web Portal > Custom Button** in the left Preferences panel
#. Click **Checkbox** for **Button name** in Custom Button window
#. Click **Tasks > Delete**
#. Click **Ok**

Reorder Buttons
'''''''''''''''

#. Go to **Preferences** in the top panel
#. Go to **Captive Web Portal > Custom Button** in the left Preferences panel
#. Click **Tasks > Reorder**
#. Click to **highlight Buttons** to be reordered in Reorder window
#. Click **Save**

Creating Custom Pages
---------------------

You can also create custom Captive Web Portal layouts for use in different
situations.

.. toctree::
   :maxdepth: 1

   cwp-design