Skip to content

Commit

Permalink
contrib: Captive portal for wlan-ap (#453)
Browse files Browse the repository at this point in the history
* Create install-nodogsplash.sh

* Create nodogsplash.conf

* Update install-nodogsplash.sh

* Create README.md

* Clean up
  • Loading branch information
darkdrgn2k committed Dec 8, 2019
1 parent f7ca4f9 commit a9914a1
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
22 changes: 22 additions & 0 deletions contrib/captive-portal/README.md
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)
18 changes: 18 additions & 0 deletions contrib/captive-portal/install-nodogsplash.sh
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
21 changes: 21 additions & 0 deletions contrib/captive-portal/nodogsplash.conf
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

0 comments on commit a9914a1

Please sign in to comment.