-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
contrib: Captive portal for wlan-ap (#453)
* Create install-nodogsplash.sh * Create nodogsplash.conf * Update install-nodogsplash.sh * Create README.md * Clean up
- Loading branch information
1 parent
f7ca4f9
commit a9914a1
Showing
3 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# NoDogSplash captive portal | ||
|
||
Source: https://github.com/nodogsplash/nodogsplash | ||
|
||
Nodogsplash is a Captive Portal that offers a simple way to provide restricted access to the Internet by showing a splash page to the user before Internet access is granted. | ||
|
||
This script install and configured the Nodogsplash captive portal to run on `wlan-ap` interface of the prototype stack. | ||
|
||
## Installation | ||
|
||
``` | ||
chmod +x install-nodogsplash.sh | ||
./install-nodogsplash.sh | ||
``` | ||
|
||
## Issues | ||
|
||
Some people have objections using captive portal because it hijacks traffic and could potentially be a privacy violation. Additionally it prevents headless devices from accessing the internet. | ||
|
||
## Nice to have | ||
|
||
- [ ] Nice tomesh splash screen (/etc/nodogsplash/htdocs/splash.sh) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash | ||
|
||
sudo apt install -y libmicrohttpd-dev | ||
|
||
mkdir tmp | ||
cd tmp | ||
git clone https://github.com/nodogsplash/nodogsplash.git | ||
cd nodogsplash | ||
make | ||
sudo make install | ||
sudo cp debian/nodogsplash.service /etc/systemd/system | ||
cd .. | ||
cd .. | ||
rm -rf tmp | ||
|
||
cp nodogsplash.conf /etc/nodogsplash/nodogsplash.conf | ||
sudo systemctl enable nodogsplash | ||
sudo systemctl start nodogsplash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
GatewayInterface wlan-ap | ||
#login_option_enabled 1 | ||
FirewallRuleSet authenticated-users { | ||
FirewallRule allow all | ||
} | ||
FirewallRuleSet preauthenticated-users { | ||
# FirewallRule allow tcp port 80 to 123.321.123.321 | ||
} | ||
FirewallRuleSet users-to-router { | ||
FirewallRule allow udp port 53 | ||
FirewallRule allow tcp port 53 | ||
FirewallRule allow udp port 67 | ||
FirewallRule allow tcp port 22 | ||
# FirewallRule allow tcp port 80 | ||
# FirewallRule allow tcp port 443 | ||
} | ||
GatewayName ToMeshNode | ||
GatewayAddress 10.0.0.1 | ||
GatewayPort 2050 | ||
MaxClients 250 | ||
AuthIdleTimeout 480 |