Deployment Guide
Table Of Contents
- Table of Contents
- Preface
- About Extreme Campus Controller Deployment
- Configuring DHCP, NPS, and DNS Services
- Centralized Site with a Captive Portal
- Centralized Site with AAA Network
- Deploying a Mesh Network
- Configuring an External NAC Server for MBA and AAA Authentication
- Manage RADIUS Servers for User Authentication
- External Captive Portal on a Third-Party Server
- Access Control Rule Admin Portal Access
- Deploying Centralized Web Authentication
- Deploying ExtremeCloud IQ - SE as an External Captive Portal
- Deployment Strategy
- Configuring an External Captive Portal Network
- Editing the Configuration Profile for Network and Roles
- Extreme Campus Controller Default Pass-Through Rule
- Adding Extreme Campus Controller as a Switch to ExtremeCloud IQ - Site Engine
- Editing the Unregistered Policy on ExtremeCloud IQ - Site Engine
- Editing the ExtremeCloud IQ - Site Engine Profile for Policy and Location-Based Services
- Deploying an ExtremeGuest Captive Portal
- Deploying Client Bridge
- Deploying an Availability Pair
- Deploying Universal APs
- Extreme Campus Controller Pair with ExtremeLocation and AirDefense
- ECP Local Authentication
- PHP External Captive Portal, Controller’s Firewall Friendly API
- Index
login.php
<?php
// login.php
// This is a simple implementation of a script that
// receives a user's credentials, authenticates the
// credentials, selects an access control role for
// the user, then redirects the user back to the
// controller using a signed URL containing the selected
// access control role.
// This script assumes that the credentials are
// submitted on the form created by the example script
// net-auth.php.
//
//
// Assumptions
// ===========
// 1. The controller is configured to include its IP address
// and port in the redirection URL and the submitted login
// form contains that IP address and port. This allows the
// ECP to interact with more than one controller.
// 2. Whether the script uses HTTP or HTTPS in its redirection
// response depends on the value of use_https,
// which must be defined in php.ini.
// If the value of use_https is 1, then the script uses
// HTTPS. If the configuration variable has any other value
// or is not defined, then the script uses HTTP. In practice,
// an actual site is going to settle on using HTTP or HTTPS.
// The scripts can then assume that method is being used
// rather than looking up the method in php.ini.
// The use_https is a user-
// defined variable. It must be created in php.ini by the
// web server administrator.
require_once("ffecp_config.php");
require_once("crypt_aws_s4.php");
require_once("common_utilities.php");
// Some local constants
const EWC_HTTP_REQ = "http://";
const EWC_HTTPS_REQ = "https://";
const EWC_REDIRECT_TARGET = "/ext_approval.php?";
// The mainline begins here. The utilities are defined after the
// mainline.
// 1. Collect the parameters submitted on the login form.
// Some of these attributes come from hidden fields.
$hwc_ip = trim($_REQUEST['hwc_ip']);
$hwc_port = trim($_REQUEST['hwc_port']);
$dest = trim($_REQUEST['dest']);
$token = trim($_REQUEST['token']);
$username = (isset($_REQUEST['userid'])) ?
trim($_REQUEST['userid']) : "";
$passwd = (isset($_REQUEST['passwd'])) ?
trim($_REQUEST['passwd']) : "";
$wlan = isset($_REQUEST['wlan']) ?
trim($_REQUEST['wlan']) : "";
if(!tokenCheck($token)) {
printError("Error: <span style='color:red'>Failed to process the request: incorrect
token.</span>");
exit;
} else if(isset($hwc_port) && !is_numeric($hwc_port)) {
printError("Error: <span style='color:red'>Failed to process the request: incorrect
port.</span>");
exit;
} else if(!empty($wlan) && !is_numeric($wlan)) {
printError("Error: <span style='color:red'>Failed to process the request: incorrect
PHP External Captive Portal, Controller’s Firewall
Friendly API login.php
Extreme Campus Controller Deployment Guide for version 5.46.03 201










