forked from midefos/martillo-maldito
improving docker ban and allow
This commit is contained in:
1 parent
9c22f2203d
commit
b6b1cdd000
3 files changed
+92
-25
No files matched your search
+6
-5
@@ -10,9 +10,7 @@ use iptables_wrapper::{
|
||||
};
|
||||
use linemux::MuxedLines;
|
||||
use login_attempt::LoginAttempt;
|
||||
use std::path::PathBuf;
|
||||
use std::thread::spawn;
|
||||
use std::{collections::HashMap, thread::sleep, time::Duration};
|
||||
use std::{collections::HashMap, path::PathBuf, thread::sleep, thread::spawn, time::Duration};
|
||||
use structopt::StructOpt;
|
||||
|
||||
#[tokio::main]
|
||||
@@ -24,8 +22,11 @@ async fn main() {
|
||||
} => {
|
||||
let _ = start_ban_server(ssh_auth_log, iptables_save).await;
|
||||
}
|
||||
Cli::ListBannedIps => {
|
||||
println!("{}", serde_json::to_string(&list_banned_ips()).unwrap());
|
||||
Cli::ListBannedIps { docker } => {
|
||||
println!(
|
||||
"{}",
|
||||
serde_json::to_string(&list_banned_ips(docker)).unwrap()
|
||||
);
|
||||
}
|
||||
Cli::ListSecuredPorts { docker } => {
|
||||
println!(
|
||||
|
||||
Reference in new issue
Block a user