Table of Contents

Captive Portal

*For the Fortigate

Basic Setup

Captive Portal Configuration

Configuration for the captive portal is split between several different locations.

Note: The layout between the GUI/CLI are different, but since the CLI statements are the definitive device config, this is written based upon the layout in the CLI.

Captive Portal Setup

Firewall Policies & Portal Bypass Rules

Firewall Rules can include address objects (or groups) and user accounts (or groups). Authentication is usually tied to the source IP address.

If the source is not authenticated at all, then it won't be able to match any rules which require authentication. As such, it is possible to trigger captive portal authentication just off of a firewall rule. However, there are fewer options available when triggering authentication this way, so best practice would be to enable it on the source interfaces.

Generally, the ship is expected to have two sets of firewall rules:

  1. Underway Mode:
    • Internet access requires captive portal authentication.
    • Ensures that only authenticated users can access the network while at sea.
  2. Shore Mode:
    • Captive portal authentication is not required.
    • Simplifies access for crew and systems when docked and connected to a trusted network.

Note: Firewall rules in FortiGate are evaluated top-to-bottom.

Rule Definitions:

  1. CaptivePortalBypass Rule:
    • source = CaptivePortalBypass address group (trusted IPs/subnets exempt from the portal).
    • destination = any (allow unrestricted access to any destination).
    • Trusted devices (e.g., ship systems or critical infrastructure) that do not require captive portal authentication.
  2. CaptivePortalRequirement Rule:
    • source = SourceIPGroup AND SourceUserGroup (both a specific source IP and authenticated user group must match).
    • destination = any (allow access to any destination for authenticated users).
    • Enforces captive portal authentication for users connecting to the Internet.

The assumption here is that normally CaptivePortalBypass is empty. When the portal needs to be bypassed in port, then the group is populated with address objects for the wifi network.

  1. Underway:
    • CaptivePortalBypass group is empty. The bypass rule is skipped because there are no addresses in the group to match.
    • So all traffic falls through to the CaptivePortalRequirement rule. Denies traffic from unauthenticated sources. Ensures all Internet access requires captive portal authentication.
  2. Shore:
    • CaptivePortalBypass group is populated. The bypass rule matches traffic from the specified source addresses (e.g., Wi-Fi network).
    • Since the traffic matches the first rule, it is allowed without needing captive portal authentication. No further rules (e.g., CaptivePortalRequirement) are processed for this traffic.