Fail2ban 常用指令集

    內容表格
    沒有標頭
    Cmd Description
    service fail2ban restart restart fail2ban service (after edit configuration)
    fail2ban-client reload restart fail2ban client
    fail2ban-client status get list activated jail
    fail2ban-client status <JAIL>
    example: fail2ban-client status wplogin
    example: fail2ban-client status sshd
    get <JAIL> status (the number of unsuccessful attempts and the list of banned IPs)
    fail2ban-regex /var/lib/docker/containers/<CONTAINERID>/<CONTAINERID>-json.log /etc/fail2ban/filter.d/wplogin.conf test regex wplogin
    fail2ban-regex /var/log/auth.log /etc/fail2ban/filter.d/sshd.conf test regex sshd
    fail2ban-regex "line" "failregex" test regex
    fail2ban-client set <JAIL-NAME> unbanip <IP-ADDRESS> manually unban IP
    fail2ban-client  set <JAIL-NAME> banip <IP-ADDRESS> manually Ban IP
    tail -f /var/log/fail2ban.log view fail2ban logs
    iptables -L –line-numbers list IP blocked with line numbers
    iptables -D <Jail-Name> -s <IP-ADDRESS> -j DROP
    Example: Jail-Name =f2b-wplogin
    Jail-Name =f2b-sshd
    Unban IP
    fail2ban-server -b start fail2ban server
    docker inspect –format='{{.LogPath}}' $INSTANCE_ID return instance log file path
    標籤 (Edit tags)
    • No tags
    您必須 登入 才能發佈評論。
    Powered by MindTouch Core