Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:dpi:dpi_components:module_wi-fi_hotspot:start [2024/06/18 14:09] – [Configuration] kparamonov | en:dpi:dpi_components:module_wi-fi_hotspot:start [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Wi-Fi HotSpot (Captive Portal for Wi-Fi authorization) ====== | ||
| - | {{indexmenu_n> | ||
| - | ===== Introduction ===== | ||
| - | The module provides the feature to [[https:// | ||
| - | |||
| - | ===== Architecture ===== | ||
| - | |||
| - | {{ : | ||
| - | ===== Scenarios of use ===== | ||
| - | |||
| - | When a subscriber connects to Wi-Fi, the router requests the DCHP server to obtain a new IP address. The server returns the addresses to the router and runs the shell-script, | ||
| - | |||
| - | Then the subscriber is redirected to the browser start page, where he needs to go through the authorization by phone number. The web server receives a successful authorization response from the SMS gateway and, using a shell-script, | ||
| - | |||
| - | {{ : | ||
| - | ===== Installation and Upgrade ===== | ||
| - | |||
| - | ==== Hardware Recommendations ==== | ||
| - | In order to run the module you can use the following hardware or virtual machines matching the following characteristics: | ||
| - | - CPU 2.5 GHz, 1 pcs | ||
| - | - RAM 512 MB - 1 GB | ||
| - | - HDD 20 GB - 50 GB | ||
| - | - Operating system CentOS 7.x, CentOS 8.x, [[en: | ||
| - | - NIC ranging from 10 Mbps | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | ==== Before installation ==== | ||
| - | |||
| - | === New Virtual Machine === | ||
| - | |||
| - | - Make sure the openssh-clients is installed, it is required to connect to the DPI | ||
| - | - The rest of environment will be installed automatically | ||
| - | |||
| - | === Old Virtual Machine === | ||
| - | |||
| - | - Make sure the openssh-clients is installed, it is required to connect to the DPI | ||
| - | - If PHP version <7.1 is installed, uninstall the old one: < | ||
| - | - If MySql is installed, uninstall it:< | ||
| - | |||
| - | |||
| - | === CentOS 6 === | ||
| - | |||
| - | Recommended operating system is Cent Cent OS 7+ | ||
| - | If you need to install the module on Cent OS 6, make sure that supervisor 3+ is installed. If you do not have the needed package, plese install it using the following commands: | ||
| - | < | ||
| - | sudo wget https:// | ||
| - | yum install supervisor-3.0-1.gf.el6.noarch.rpm | ||
| - | </ | ||
| - | |||
| - | ==== Installation ==== | ||
| - | |||
| - | |||
| - | <note warning> | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | <note important> | ||
| - | |||
| - | To install, run the script: | ||
| - | < | ||
| - | # | ||
| - | |||
| - | info () { | ||
| - | echo -e " info: $@ "; | ||
| - | } | ||
| - | |||
| - | ok () { | ||
| - | echo -e " done: $@ "; | ||
| - | } | ||
| - | |||
| - | error () { | ||
| - | echo -e " ERROR: | ||
| - | } | ||
| - | |||
| - | CENTOSRELEASE=`cat / | ||
| - | SUBSTR=`echo $CENTOSRELEASE|cut -c1-22` | ||
| - | SUBSTR2=`echo $CENTOSRELEASE|cut -c1-26` | ||
| - | |||
| - | #Check OS version | ||
| - | CentOsVersion=0 | ||
| - | if [ " | ||
| - | then | ||
| - | CentOsVersion=70 | ||
| - | elif [ " | ||
| - | then | ||
| - | CentOsVersion=65 | ||
| - | elif [ " | ||
| - | then | ||
| - | CentOsVersion=64 | ||
| - | else | ||
| - | CentOsVersion=60 | ||
| - | fi | ||
| - | |||
| - | #Configure repos | ||
| - | info " | ||
| - | |||
| - | rpm --import http:// | ||
| - | rpm -Uvh http:// | ||
| - | |||
| - | |||
| - | MARIADB_REPO=/ | ||
| - | if [ " | ||
| - | then | ||
| - | rpm -Uvh https:// | ||
| - | rpm -Uvh https:// | ||
| - | | ||
| - | echo " | ||
| - | name=MariaDB | ||
| - | baseurl=http:// | ||
| - | gpgkey=https:// | ||
| - | gpgcheck=1" | ||
| - | |||
| - | else | ||
| - | |||
| - | rpm -Uvh https:// | ||
| - | rpm -Uvh https:// | ||
| - | | ||
| - | MACHINE_TYPE=`uname -m` | ||
| - | if [ ${MACHINE_TYPE} == ' | ||
| - | then | ||
| - | |||
| - | echo " | ||
| - | name=MariaDB | ||
| - | baseurl=http:// | ||
| - | gpgkey=https:// | ||
| - | gpgcheck=1" | ||
| - | |||
| - | else | ||
| - | echo " | ||
| - | name=MariaDB | ||
| - | baseurl=http:// | ||
| - | gpgkey=https:// | ||
| - | gpgcheck=1" | ||
| - | fi | ||
| - | |||
| - | |||
| - | fi | ||
| - | ok " | ||
| - | |||
| - | # | ||
| - | info "Wifi hotspot package installing..." | ||
| - | |||
| - | yum install -y wifi_hotspot --exclude=php-common*; | ||
| - | |||
| - | info " | ||
| - | </ | ||
| - | |||
| - | The rpm wifi_hotspot package will be installed. It will be configured automatically according to the default configuration. | ||
| - | |||
| - | Installation/ | ||
| - | - PHP >= 7.1 | ||
| - | - MariaDB >= 10.4 | ||
| - | - Apache | ||
| - | - Composer | ||
| - | - PHP SSH2 lib | ||
| - | - Laravel/ | ||
| - | |||
| - | The necessary ports will be opened, and cron will be launched to perform scheduled background tasks during the installation process. | ||
| - | |||
| - | The module will be installed to the \\ < | ||
| - | |||
| - | After the installation, | ||
| - | \\ < | ||
| - | |||
| - | ==== Upgrade ==== | ||
| - | To update a previously installed version, run the following command: < | ||
| - | |||
| - | ==== Configuration ==== | ||
| - | |||
| - | System settings of the module are in the .env file: < | ||
| - | |||
| - | The contents of the file are as follows: | ||
| - | < | ||
| - | #System settings, it’s worth to avoid modifying it | ||
| - | APP_ENV=local | ||
| - | APP_DEBUG=true | ||
| - | APP_KEY= | ||
| - | APP_TIMEZONE=UTC | ||
| - | |||
| - | #System settings for connecting to the MySql database, it’s worth to avoid modifying it | ||
| - | DB_CONNECTION=mysql | ||
| - | DB_HOST=localhost | ||
| - | DB_PORT=3306 | ||
| - | DB_DATABASE=wifi_hotspot | ||
| - | DB_USERNAME=root | ||
| - | DB_PASSWORD=vasexperts | ||
| - | |||
| - | #Settings for connecting to the SMTP server. They serve to send authorization data in debug mode. | ||
| - | CFG_SMTP_UNAME=smtptestvasexperts@gmail.com | ||
| - | CFG_SMTP_PW= | ||
| - | CFG_SMTP_HOST=smtp.gmail.com | ||
| - | CFG_SMTP_PORT=587 | ||
| - | CFG_SMTP_SECURE=tls | ||
| - | CFG_SMTP_SENDER=smtptestvasexperts@gmail.com | ||
| - | |||
| - | #System settings, modifying is fobidden | ||
| - | CACHE_DRIVER=file | ||
| - | QUEUE_DRIVER=database | ||
| - | SESSION_DRIVER=cookie | ||
| - | |||
| - | #Debugging mode for interaction between Hotspot and DPI. When enabled, a request to the SMS/call authorization service is not sent. Authorization code 0000. | ||
| - | #Default 0 | ||
| - | DEBUG_MODE=0 | ||
| - | |||
| - | </ | ||
| - | |||
| - | <note important> | ||
| - | ==== Version Information ==== | ||
| - | === Version v.1.3.5 (18.06.2024) === | ||
| - | * Added the ability to set a priority authorization method (available for version dpiui2 >= 2.34.5) | ||
| - | * Added the ability to enable debug mode for the Hotspot interaction script with SKAT (option DEBUG_MODE in / | ||
| - | * Bugfix | ||
| - | |||
| - | === Version v.1.3.3 (16.10.2023) === | ||
| - | * Added possibility of auto substitution of code from SMS into the code input field (on mobile devices); | ||
| - | * Added option in the configuration file (backend/ | ||
| - | |||
| - | === Version v.1.2.19 (11.04.2022) === | ||
| - | Corrects errors that occurred when using services that did not support phone numbers with a leading " | ||
| - | * Added possibility to delete leading " | ||
| - | * Added option to replace the leading " | ||
| - | |||
| - | === Version v.1.2.17 (01.03.2022) === | ||
| - | * Fixed errors in subscriber authorization/ | ||
| - | * Extended subscriber authorization/ | ||
| - | * Added ability to export AAA sessions | ||
| - | * Added the ability to configure the length of subscribers authorization code | ||
| - | |||
| - | === Version v.1.2.4 (02.10.2020) === | ||
| - | * Bugs fixed | ||
| - | |||
| - | === Version v.1.1.0 (06.11.2019) === | ||
| - | * The process of replacing the logo and icons through the dpiui2 interface reworked | ||
| - | * The size limitation of logo or icon file from 64kb to 750kb changed | ||
| - | |||
| - | === Version v.1.0.10 (10/ | ||
| - | * Correction of the display of the portal on mobile devices | ||
| - | * Correction of the re-authorization algorithm | ||
| - | |||
| - | === Version v.1.0.7 (15.09.2019) === | ||
| - | * Created a new Wi-Fi HotSpot module | ||
| - | |||
| - | ===== Subscriber Interaction ===== | ||
| - | |||
| - | Interaction between HotSpot and the subscriber on the SSG and the commands executed during this process: | ||
| - | - Script triggered by DHCP (unloaded on SSG at ''/ | ||
| - | fdpi_ctrl load --policing --profile.name=' | ||
| - | - Commands executed on the SSG upon successful user authorization: | ||
| - | - If a subscriber with this login already exists: <code bash> | ||
| - | - Remove the policing profile for authorization from the subscriber: <code bash> | ||
| - | - Remove service 5 from the subscriber: <code bash> | ||
| - | - Remove service 11 (NAT) from the subscriber: <code bash> | ||
| - | - Create a bind subscriber: <code bash> | ||
| - | - Apply the policing profile for internet access to the subscriber: <code bash> | ||
| - | - If services are set in the GUI form that need to be applied to the subscriber: <code bash> | ||
| - | - If service profiles are set in the GUI form that need to be applied to the subscriber: <code bash> | ||
| - | - Commands executed on the SSG when the authorized user's session has expired: | ||
| - | - Remove the policing profile for internet access from the subscriber: <code bash> | ||
| - | - Retrieve the list of services applied to the subscriber and remove them: <code bash> | ||
| - | fdpi_ctrl del --service [service] --login=' | ||
| - | - Delete the bind subscriber: <code bash> | ||
| - | - Execute the script on the SSG to add service profile 5 and policing profile for authorization (see item 1) <code bash>sh / | ||