diff --git a/doc/README.bridging b/doc/README.bridging index 345a58920e..7cb1d139bd 100644 --- a/doc/README.bridging +++ b/doc/README.bridging @@ -1,7 +1,5 @@ - Using ntopng in bridging mode ----------------------------- - 0. Suppose you want to bridge zc:eth3 with zc:eth4. If the interface names are different please adapt tools/load_hugepages.sh @@ -20,4 +18,14 @@ Using ntopng in bridging mode NOTE: - Interface bridging is available in the professional version. - It can work (at lower speed and higher latency) also with non-ZC - network interfaces \ No newline at end of file + network interfaces + + + +Enabling Captive Portal +----------------------- +Captive portal is used to authenticate legitimate users and bind them to the +correct host pool. In order to enable this feature +- you need the enterprise version of ntopng +- the captive portal option must be enabled in the ntoopng preferences menu +- ntopng must be active on port 80 and 443 for authenticating users (-w 80 -W 443) diff --git a/include/Prefs.h b/include/Prefs.h index 5f51578fe5..c13d25c068 100644 --- a/include/Prefs.h +++ b/include/Prefs.h @@ -49,7 +49,7 @@ class Prefs { enable_users_login, disable_localhost_login, online_license_check, enable_idle_local_hosts_cache, enable_active_local_hosts_cache, enable_probing_alerts, enable_syslog_alerts, dump_flow_alerts_when_iface_alerted, - enable_top_talkers; + enable_top_talkers, enable_captive_portal; LocationPolicy dump_hosts_to_db, sticky_hosts; u_int non_local_host_max_idle, local_host_cache_duration, local_host_max_idle, flow_max_idle; u_int16_t intf_rrd_raw_days, intf_rrd_1min_days, intf_rrd_1h_days, intf_rrd_1d_days; @@ -98,8 +98,9 @@ class Prefs { void setTraceLevelFromRedis(); void setAlertsEnabledFromRedis(); - void bind_http_to_loopback() { http_binding_address = strdup((char*)CONST_LOOPBACK_ADDRESS); }; + void bind_http_to_loopback() { http_binding_address = strdup((char*)CONST_LOOPBACK_ADDRESS); }; void bind_https_to_loopback() { https_binding_address = strdup((char*)CONST_LOOPBACK_ADDRESS); }; + bool getDefaultBoolPrefsValue(const char *pref_key, const bool default_value); public: Prefs(Ntop *_ntop); @@ -219,8 +220,9 @@ class Prefs { inline char* getInterfaceAt(int id) { return((id >= MAX_NUM_INTERFACES) ? NULL : ifNames[id].name); } inline pcap_direction_t getCaptureDirection() { return(captureDirection); } inline void setCaptureDirection(pcap_direction_t dir) { captureDirection = dir; } - inline bool hasCmdlTraceLevel() { return has_cmdl_trace_lvl; } - inline bool hasCmdlDisableAlerts() { return has_cmdl_disable_alerts; } + inline bool hasCmdlTraceLevel() { return has_cmdl_trace_lvl; } + inline bool hasCmdlDisableAlerts() { return has_cmdl_disable_alerts; } + inline bool isCaptivePortalEnabled() { return(enable_captive_portal); } }; #endif /* _PREFS_H_ */ diff --git a/include/ntop_defines.h b/include/ntop_defines.h index a1b5e51bf4..8ccd826d8b 100644 --- a/include/ntop_defines.h +++ b/include/ntop_defines.h @@ -371,9 +371,9 @@ #define CONST_HOST_ACTIVITY_RRD_1D_DAYS "ntopng.prefs.host_activity_rrd_1d_days" #define CONST_MAX_NUM_ALERTS_PER_ENTITY "ntopng.prefs.max_num_alerts_per_entity" #define CONST_MAX_NUM_FLOW_ALERTS "ntopng.prefs.max_num_flow_alerts" -#define CONST_PROFILES_PREFS "ntopng.prefs.profiles" -#define CONST_PROFILES_COUNTERS "ntopng.profiles_counters.ifid_%i" - +#define CONST_PROFILES_PREFS "ntopng.prefs.profiles" +#define CONST_PROFILES_COUNTERS "ntopng.profiles_counters.ifid_%i" +#define CONST_PREFS_CAPTIVE_PORTAL "ntopng.prefs.enable_captive_portal" #define HOST_POOL_IDS_KEY "ntopng.prefs.%u.host_pools.pool_ids" #define HOST_POOL_MEMBERS_KEY "ntopng.prefs.%u.host_pools.members.%s" #define HOST_POOL_SHAPERS_KEY "ntopng.prefs.%u.l7_policies.%s" diff --git a/scripts/locales/en.lua b/scripts/locales/en.lua index f3335877ad..de49de77ac 100644 --- a/scripts/locales/en.lua +++ b/scripts/locales/en.lua @@ -183,7 +183,7 @@ local en = { }, host_pools = { - pool = "Pool", + pool = "Pool Name", manage_pools = "Manage Pools", create_pools = "Create Pools", empty_pool = "Empty Pool", diff --git a/scripts/lua/admin/host_pools.lua b/scripts/lua/admin/host_pools.lua index 424abccc8b..f8bb624d0a 100644 --- a/scripts/lua/admin/host_pools.lua +++ b/scripts/lua/admin/host_pools.lua @@ -115,6 +115,9 @@ end -------------------------------------------------------------------------------- print [[ +