Better log unmanaged

parent 60ee64dd
......@@ -31,6 +31,7 @@ templconf = """
"nostart": [],
"noapps": [],
"knownapps": ["DHCP", "DHCPV6", "DNScrypt", "DoH_DoT", "DNS", "Ookla", "ICMP", "ICMPV6", "IGMP", "LLMNR", "MDNS", "DoH_DoT", "Ookla", "WSD"],
"knowstarts": [],
"ipset": "system_triplet",
"timeout":"3600"
},
......@@ -39,6 +40,7 @@ templconf = """
"nostart": [],
"noapps": [],
"knownapps": ["Steam", "Xbox", "Playstation"],
"knowstarts": ["TLS", "HTTP"],
"ipset": "streaming_triplet",
"timeout":"3600"
},
......@@ -47,6 +49,7 @@ templconf = """
"nostart": ["DNS", "ICMP"],
"noapps": [],
"knownapps": [],
"knowstarts": [],
"ipset": "name_ipset",
"timeout":"3600"
}
......@@ -185,6 +188,9 @@ class NexDPI():
cname = flow.application_category_name
aname = flow.application_name
sername = aname.split(".")[-1:][0]
startname = False
if aname != sername:
startname = aname.split(".")[:-1][0]
ipv=flow.ip_version
log.debug("RECEIVED: "+cname+" "+aname+" "+sername+"\n\n"+str(flow))
......@@ -216,7 +222,10 @@ class NexDPI():
sh("ipset add "+ipset_list+" "+triplet+" timeout "+Cats[cname]['timeout']+" --exist > /dev/null 2>&1")
log.info("ADD: "+ipset_list+" "+triplet+" "+self.fullname)
if sername in list(Cats[cname]['knownapps']):
continue
if not start:
continue
elif startname in list(Cats[name]['knowstarts']):
continue
if self.fullname and not self.fullname in UnknownMatch:
log.warning("UNKNOWN("+str(managed)+"): "+self.fullname)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment