This repository houses a Docker setup for a Hotspot 2.0 Online Sign-Up (OSU) server, tailored for experimental and testing environments. It leverages Ubuntu as the base system and incorporates services such as Apache2, hostapd, and a RADIUS server, pre-configured to align with the Hotspot 2.0 standards.
Note: This Container is Completely Untested. Don't expect it to work just yet.
Ensure Docker is installed on your machine. For installation guidance, consult the official Docker documentation.
- Dockerfile: Specifies the Docker container setup.
- entrypoint.sh: Initialization script for container services.
- /ca: Holds certificate authority files and scripts to help generate new ones.
- /config: Configuration files for hostapd, Apache, and other services.
- /www: Web server directory containing PHP scripts and HTML for OSU interaction.
Navigate to the project's root directory and execute:
docker build -t docker-hs20server .
This command constructs the Docker image tagged as docker-hs20server
.
To run the container:
docker run -d -p 80:80 -p 443:443 --name hs20server docker-hs20server
This starts the container in detached mode, binding ports 80 (HTTP) and 443 (HTTPS) to the host.
This setup assumes an Ubuntu server with Apache2. Adjust package names and configuration parameters if using other environments. Note: This setup is intended for lab use only and requires security modifications for public deployment.
-
Install Dependencies: Ensure your system has all required packages:
sudo apt-get install sqlite3 apache2 php-sqlite3 php-xml libapache2-mod-php build-essential libsqlite3-dev libssl-dev libxml2-dev
-
Setup Directory Structure: Choose an installation directory, for example,
/home/user/hs20-server
, and set appropriate permissions. -
Build hostapd and hs20_spp_server: Follow build instructions specific to these services, ensuring all configurations align with your setup requirements.
-
Initialize CA: Navigate to the
ca
directory and utilizesetup.sh
to configure your CA, adjusting parameters to fit your hostname and requirements. -
Configure Apache and PHP: Update
/etc/apache2/sites-available/default-ssl
to utilize your server certificates and adjust PHP settings as necessary.
For further details on configuring and building hostapd
and hs20_spp_server
, visit the following resources:
Ensure to review these resources to align with the latest best practices and updates.
The management UI is accessible via https://<server-address>/hs20/users.php
. Replace <server-address>
with your actual server IP or hostname.
Contributions to enhance this Docker Hotspot 2.0 server setup are welcomed. Please adhere to standard coding practices and submit pull requests for review.