better rule contains
This commit is contained in:
parent
d02c0b7c66
commit
8256b0358d
@ -8,7 +8,7 @@ pub fn is_port_secured(port: u16, docker: bool) -> bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for rule in rules.unwrap() {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user