1
0

better rule contains

This commit is contained in:
midefos 2024-06-09 15:32:53 +02:00
parent d02c0b7c66
commit 8256b0358d

View File

@ -8,7 +8,7 @@ pub fn is_port_secured(port: u16, docker: bool) -> bool {
}
for rule in rules.unwrap() {
if rule.contains(&format!("-p tcp --dport {} -j DROP", port)) {
if rule.contains(&format!("-p tcp -m tcp --dport {} -j DROP", port)) {
return true;
}
}