Commit graph

86 commits

Author SHA1 Message Date
Luca Deri
b0a69f164d Code cleanup 2018-06-20 08:54:57 +02:00
Luca Deri
1ee5eff201 Minor code cleanup 2018-06-20 08:25:24 +02:00
Simone Mainardi
8f1228c04f Captive portal HTTP server fixes 2018-06-19 17:29:36 +02:00
Luca Deri
56b275124f Improved ntopng startup time
Split the HTTP server into management and non-management (splash) servers

Implemented protection of the HTTP interface via an ACL that can be set with
- redis-cli set ntopng.prefs.http_acl_management_port "XXXX"

Where XXXX has the format +net/mask,+net/mask....

Example:
- You want the HTTP management interface be accessible only from localhost
   redis-cli set ntopng.prefs.http_acl_management_port "+127.0.0.0/8"

- You want the HTTP management interface be accessible for everybody except 192.168.0.0/16
  redis-cli set ntopng.prefs.http_acl_management_port "+0.0.0.0/0,-192.168.0.0/16"
2018-06-19 11:43:49 +02:00
Luca Deri
30610bda60 Added code to randomize values returned by rand() 2018-06-17 15:24:25 +02:00
Luca
da772fb01d Fix for not sending 302 return code with -l 0 2018-06-13 19:27:01 +02:00
Luca
29caa78eb1 Renamed Lua into LuaEngine to avoid name clashes 2018-06-13 18:17:49 +02:00
Simone Mainardi
8cca1f6703 Implements informative captive portal (no login) 2018-06-06 10:33:36 +02:00
emanuele-f
a70dce4301 Secure ntopng cookies with SameSite and HttpOnly
HttpOnly prevents the cookie from being accessed by javascript code and restricts XMLHttpObject utilization.
See https://blog.codinghorror.com/protecting-your-cookies-httponly/ .

SameSite=lax restricts cookie utilization in iframes, images or XMLHttpRequests, but still allows external
sites to link to the ntopng webserver and use the existing authenticated user session.
See https://www.sjoerdlangkemper.nl/2016/04/14/preventing-csrf-with-samesite-cookie-attribute/ .
2018-05-16 11:43:23 +02:00
emanuele-f
24faaa0e20 Fix ntopng messages interpreted as mongoose errors 2018-05-15 18:27:42 +02:00
emanuele-f
dba841a16b Print mongoose error messages 2018-05-15 10:52:50 +02:00
emanuele-f
2ce6ac2fc1 Fix ntopng login redirection 2018-05-08 14:02:00 +02:00
emanuele-f
3a1728414d Redirect to login when session expires 2018-03-27 15:16:30 +02:00
Luca Deri
f0c936c368 Updated (C) to 2018 2018-03-22 21:59:42 +01:00
emanuele-f
99b67b16ad Remove old nedge define and move to new one 2018-02-09 13:01:08 +01:00
Simone Mainardi
74a5ac644d Fixes issues when serving static content (e.g., css) 2018-01-25 18:45:08 +01:00
emanuele-f
6102f42f53 Block captive portal users ntopng web login 2018-01-25 14:14:08 +01:00
Simone Mainardi
aa11e532e1 Fixes nEDGE captive portal ssl redirection 2018-01-17 12:41:34 +01:00
Luca Deri
c9ecd931d9 Code cleanup 2017-12-16 08:23:56 +01:00
Luca Deri
b5ad7ebfce Fixed invalid termination sequence that might have lead to crash during termination 2017-11-12 12:40:03 +01:00
emanuele-f
4a17ab7047 Improve licence expire message 2017-10-27 13:06:23 +02:00
Luca Deri
b6c7f08eb5 Updates for systemd
Added checks for end demo mode
2017-10-22 19:52:26 +00:00
Luca Deri
20b3c74ada Implemented support for ntop custom lua loadfile
Packaging changes for nedge
2017-10-22 18:43:21 +02:00
Luca Deri
c8de202017 Fixes to compile ntopng without MySQL
Added nEdge support in configure
2017-10-21 13:39:18 +02:00
emanuele-f
501ee043b0 Fix splash port check 2017-10-19 13:52:41 +02:00
Luca Deri
86613c081b Login bug fix 2017-10-16 14:01:29 +02:00
Luca Deri
420ce53060 Added support for HTTP splash port 2017-10-16 07:57:32 +02:00
Luca Deri
4b01406137 Improved fingerprinting support
Disabled HTTP banned page support as in the current implementation is ambiguous
Fixed flow parsing leak
2017-10-15 07:46:20 +02:00
Luca Deri
892bfe94a7 Fixrd issues with HTTP refers 2017-10-13 23:04:14 +02:00
Luca Deri
dcf27be459 Improved banned page support 2017-10-13 07:18:52 +02:00
Luca Deri
27afad6072 Refined ban support 2017-10-12 18:46:22 +02:00
Luca Deri
cfce50b986 Added support for banned sites detection with splash screen 2017-10-12 17:56:52 +02:00
emanuele-f
0c0b252297 Use 'Secure' attribute for cookies when using HTTPS
Note: insecure cookies are still permitted when running HTTP. In this case, user should add -w0 to disable HTTP.
2017-09-26 19:45:09 +02:00
Simone Mainardi
c4a6ddd3a4 Implements bridge configuration via HTTP 2017-08-16 18:09:33 +02:00
Simone Mainardi
8af4bb14c9 License info to command line 2017-07-26 19:19:21 +02:00
Simone Mainardi
b216d4bd3b Minor grafana fixes 2017-07-13 19:49:00 +02:00
Luca
be64fc6865 Fixed bug that prevented HTTP to be redirected to SSL (if enabled) 2017-06-22 16:06:13 -04:00
emanuele-f
fb3d212479 Little changes 2017-06-09 21:38:05 +02:00
Simone Mainardi
c115271c5d Implements grafana support for interfaces 2017-06-07 19:02:28 +02:00
Simone Mainardi
5780d0f543 Implements Captive Portal over SSL 2017-06-01 19:30:07 +02:00
Simone Mainardi
8b72652a5d Fixes buffer size for HTTP binding
Fixes:

29/May/2017 08:50:41 [HTTPserver.cpp:818] HTTP server listening on port(s) 172.16.0.1:80,172.16.0.1:300
2017-05-29 08:53:58 +02:00
Luca Deri
7cdff93fef Added the method to bind the GUI to an IP other than the loopback
Fixed bug that, in case o binding address, was not binding the alternate port (but jsut the main one) to the specified address
2017-05-28 22:43:54 +02:00
Luca Deri
ae0556b874 Minor optimization to avoid scanning a list twice 2017-05-28 22:13:39 +02:00
Simone Mainardi
fe90b4b4f6 Fixes for HTTP 1.0/1.1 Host: header 2017-05-28 11:42:15 +02:00
emanuele-f
ffa39896eb Add interface check in captive portal login 2017-05-25 18:21:21 +02:00
emanuele-f
011b7f5cdf Force default admin password change 2017-04-27 21:15:58 +02:00
Josh Soref
78e78c018c Fixes spellings and typos
Thank goes to
Josh Soref <jsoref@users.noreply.github.com>
2017-03-06 17:54:48 +01:00
Luca Deri
4f9be59513 Fixed invalid variable form name user -> username 2017-02-26 22:10:29 +01:00
Luca Deri
b37f141e2e Defined wildcarded hello host 2017-02-04 16:52:38 +00:00
Luca Deri
7866c90500 Optimizations on the captive portal 2017-02-03 17:26:44 +01:00