120 Commits

Author SHA1 Message Date
Rob White
155035230b Update config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-11-05 19:38:17 +00:00
Rob White
580628c1a5 Add: Support for Custom Parameters
This enhancement allows custom parameters to be defined in the config file.

This enhancement is added primarily to support remote configuration operations
using tools such as opensync, but can also be of general use.

Custom Parameters are options defined in the configuration file
and have fixed values once set.

Note: Custom Variables are very different and are defined in the FAS,
with values determined by the FAS/Client dialogue script.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-11-04 10:55:33 +00:00
Rob White
67e6b46407 Deprecate legacy splash.html and disable it.
Use login.sh with config select of "continue" or username/email login.
Allow reneabling with allow_legacy_splash config option.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-10-31 07:03:31 +00:00
Rob White
1f836d8c2b Remove support for RedirectURL
As (most) client CPD processes close immediately on authentication,
RedirectURL no longer works.
Similar but reliable functionality can be achieved by using FAS,
displaying the required URL BEFORE authenticating.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-10-31 07:03:31 +00:00
Rob White
3a7ded7407 Walled Garden: autonomous operation
Signed-off-by: Rob White <rob@blue-wave.net>
2020-10-28 21:15:20 +00:00
Rob White
fad66e6a99 Walled Garden: Configuration
Signed-off-by: Rob White <rob@blue-wave.net>
2020-10-28 21:15:20 +00:00
Rob White
faf989b317 Set OpenWrt Makefile to v6.0.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-24 18:04:53 +01:00
Rob White
bf110e867f Set version 6.0.0 in OpenWrt Makefile
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-22 19:10:26 +01:00
Rob White
38cf39763b Updates for release 6.0.0
Changelog updates for 6.0.0
Set MHD version check to >= 0.9.71
Clean up Preauth "Already authenticated" page
Update config files for v6.0.0
Add description for binauth output and input arguments
Tidy function do_binauth
Add preauth multifield login script with css update
Clarify custom string options
    Hidden or client entered custom string

Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-21 18:55:47 +01:00
Rob White
5c6d161f18 Add Walled Garden / IPSET info to config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-16 22:46:10 +01:00
Rob White
44d2f00bd4 Add/improve Walled Garden comments on config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-15 22:43:28 +01:00
Rob White
212585bf4d Bump to version 5.2.0 for new release
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-12 19:39:44 +01:00
Rob White
0fb79e0aea Set use outdated MHD enabled for Openwrt 19.7 backport and checks for MHD version
Signed-off-by: Rob White <rob@blue-wave.net>
2020-08-12 18:09:02 +01:00
Rob White
635caf9075 Bump to version 5.1.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-07-20 08:51:40 +01:00
Rob White
3637f12cf5 Fix uci config for splash_sitewide and improve fasremotefqdn comments
Signed-off-by: Rob White <rob@blue-wave.net>
2020-07-20 08:23:26 +01:00
Rob White
67b123845c Updates for release of version 5.1.0
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-24 22:12:40 +01:00
Rob White
14e8a1e0c7 More documentation updates
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-23 12:24:43 +01:00
Rob White
68d3a5a17e Update config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-19 19:49:12 +01:00
Rob White
a698f043b2 Install sitewide username/password splash support files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-19 19:49:12 +01:00
Rob White
ea7c8452d7 Bump to v5.1.0beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:53 +01:00
Rob White
893714f853 Implement Rate Quotas
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:53 +01:00
Rob White
733ee09172 Config file updates
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:53 +01:00
Rob White
035f1a0980 Rename demo-preauth scripts and install all scripts
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:52 +01:00
Rob White
83d0d474a3 Add upload/download quota and rate configuration values
Signed-off-by: Rob White <rob@blue-wave.net>
2020-06-12 23:13:52 +01:00
Colin Sindle
1235e82db1 Removed typo. 2020-06-03 21:02:17 +02:00
Rob White
75c24077b6 set version to 5.0.2beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-05-12 12:15:35 +01:00
Rob White
df3bcb21d4 Fix OpenWrt CONFLICTS variable in Makefile
Signed-off-by: Rob White <rob@blue-wave.net>
2020-05-12 08:10:59 +01:00
Rob White
3f17e681bb Fix - Path Traversal Attack vulnerability allowed by libmicrohttpd's built in unescape functionality
Signed-off-by: Rob White <rob@blue-wave.net>
2020-05-06 20:21:22 +01:00
Rob White
40f2ca3ff8 Fix PKG_BUILD_DIR in OpenWrt Makefile
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-13 20:32:25 +01:00
Rob White
9f4661e08b Release v5.0.0
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-11 14:30:58 +01:00
Rob White
80e1d09cb4 Move wait_for_interface to opennds C code
wait_for_interface was in the startup init.d/procd and opennds.service scripts.
Moved to opennds C code.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-09 21:53:08 +01:00
Rob White
228c117408 Fix firewall restart script
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-09 13:38:27 +01:00
Rob White
3d1033d39e More renaming, new splash image.
Signed-off-by: Rob White <rob@blue-wave.net>
2020-04-05 16:53:33 +01:00
Rob White
7b8d54766a Bump to v4.5.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-03-03 22:20:04 +00:00
Rob White
965cbb8b9d Release 4.5.0
Changelog:
  * Add - Enable https protocol for remote FAS [bluewavenet]
  * Add - trusted devices list to ndsctl json output [bluewavenet]
  * Add - option unescape_callback_enabled [bluewavenet]
  * Add - get_client_token library utility [bluewavenet]
  * Add - utf-8 to PreAuth header [bluewavenet]
  * Add - PreAuth Support for hashed id (hid) if sent by NDS [bluewavenet]
  * Add - library script shebang warning for systems not running Busybox [bluewavenet]
  * Add - htmlentityencode function, encode gatewayname in templated splash page [bluewavenet]
  * Add - htmlentity encode gatewayname on login page (PreAuth) [bluewavenet]
  * Add - Simple customisation of log file location for PreAuth and BinAuth [bluewavenet]
  * Add - option use_outdated_mhd [bluewavenet]
  * Add - url-encode and htmlentity-encode gatewayname on startup [bluewavenet]
  * Add - Allow special characters in username (PreAuth) [bluewavenet]
  * Add - Documentation updates [bluewavenet]
  * Add - Various style and cosmetic updates  [bluewavenet]
  * Fix - Change library script shebang to bash in Debian [bluewavenet]
  * Fix - Remove unnecessary characters causing script execution failure in Debian [bluewavenet]
  * Fix - Add missing NULL parameter in MHD_OPTION_UNESCAPE_CALLBACK [skra72] [bluewavenet]
  * Fix - Script failures running on Openwrt 19.07.0 [bluewavenet]
  * Fix - Preauth, status=authenticated [bluewavenet]
  * Fix - Prevent ndsctl from running if called from a Binauth script. [bluewavenet]
  * Fix - Minor changes in Library scripts for better portability [bluewavenet]
  * Fix - Prevent php notices on pedantic php servers [bluewavenet]
  * Fix - broken remote image retrieval (PreAuth) [bluewavenet]
  * Fix - Allow use of "#" in gatewayname [bluewavenet]

Signed-off-by: Rob White <rob@blue-wave.net>
2020-03-03 21:44:05 +00:00
Rob White
a7ef01f413 Enable https protocol for remote FAS
Previously a remote FAS could not use https protocol without generating
browser security errors or warnings so NDS enforced use of http.

A new FAS level, fas_secure_enabled = 3 is introduced here.

Level 3 is the same as level 2 except the use of https protocol is
enforced for FAS. In addition, the "authmon" daemon is loaded.

This daemon allows the external FAS, after client verification is complete,
to effectively traverse inbound firewalls and address translation to
achieve NDS authentication without generating browser security warnings.
or errors.

A fully functional https fas script is provided (fas-aes-https.php).

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-29 16:50:07 +00:00
Rob White
aa54541fca Fix comments in config files
Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-17 00:12:38 +00:00
Rob White
2a2b3693cc Fix: Allow use of "#" and "'" (single quote/asterisk) in gatewayname
See issue #516

"#" is used as a comment indicator in nodogsplash.conf
This fix allows the character to be present as part of an option value.
If the character occurs at the beginning of the line,
the line will be considered as a comment.

"'" (single quote/asterisk) is used as a uci delimiter.
If this character is required in gatewayname then use the
htmlentity &#39; instead.
The default config files have been updated to reflect this.

The demo preauth scripts have been modified to ensure
gatewayname is properly escaped.


Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-15 15:59:48 +00:00
Rob White
15ba5ea4c8 Add option use_outdated_mhd
See issue #515

MHD_get_version is used to determine the installed (runtime) version of
libmicrohttpd (MHD).
If the version is earlier than 0.9.69, then by default, NDS will terminate.

However, if option use_outdated_mhd is set to 1, NDS starts normally
but logs an error.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-10 20:58:40 +00:00
Rob White
9fb70f3ce2 Add option: option unescape_callback_enabled
Disabled is 0 (default)
Enabled is 1

This allows custom unescape  in MHD.

MHD needs to unescape characters sent in query strings by browsers.
When this option is disabled, MHD uses its builtin unescape.
When enabled, MHD uses /usr/lib/nodogsplash/unescape.sh

The unescape.sh library is safe as all incoming queries are escaped
by the client browser and the argument containing string to be unescaped
is quoted by NDS.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-02-05 19:41:50 +00:00
Rob White
84594da947 Add get_client_token library utility
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-11 16:18:17 +00:00
Rob White
112547a7aa bump to v4.4.1beta
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-09 11:14:21 +00:00
Rob White
766db1388e Bump to version 4.4.0
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-09 09:34:27 +00:00
Rob White
f52f70300e Update config file
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-05 21:31:17 +00:00
Rob White
64224223bd fwhook restart - do not use ndsctl to test if nds running
Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-05 21:31:17 +00:00
Rob White
36f94f4972 Implement unescape callback for MHD (libmicrohttpd)
This is a fix to allow "+" and "&" characters in user data passed to MHD in get requests.
Reported in issue #476, this effected PreAuth and Binauth.
"+" and "&" characters can now be used in form data, eg passwords etc.

Signed-off-by: Rob White <rob@blue-wave.net>
2020-01-01 15:57:45 +00:00
Rob White
423e328fab fas: get the client interface connections.
When option fas_secure_enabled '2' is set, get the client interface connections.

The client interface connections string is of the form:
[localif] [remotemeshnodemac] [localmeshif]
This is added to the query string as "clientif".
[remotemeshnodemac] and [localmeshif] will be null if  the client is connected
to a local interface or 802.11s mesh networking is not active.

This can be used to change the response of the FAS captive portal login page,
depending on the interface the client is connected to.

Connections to local wireless interfaces and
remote 802.11s mesh node connections are detected.

Signed-off-by: Rob White <rob@blue-wave.net>
2019-12-29 21:48:18 +00:00
Rob White
ab10da729e Bump to v4.3.4
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-20 07:25:20 +01:00
Rob White
e995d59e92 Version 4.3.3
Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-19 14:16:15 +01:00
Rob White
b040820407 Fix: Memory corruption at high loads.
*  Symptom was spontaneous restart of NDS often with no errors.
  *  Caused by coding error introduced by previous changes.
  *  Added improved checking and debuglevel logging when calling MHD.
  *  Added debuglevel logging for case of firewall restart.
  *  Return error 403(forbidden) rather than 503(internal server error) when client attempts to use a forbidden http method.
  *  Return error 403(forbidden) rather than 503(internal server error) when client attempts to use an invalid ip or mac address.
  *  Revert QUERYMAXLEN to 4096 bytes to prevent query string truncation when a client session deauthenticates whilst client is using some types of vpn software.

Signed-off-by: Rob White <rob@blue-wave.net>
2019-10-17 10:57:25 +01:00