Your IP : 10.1.73.149


Current Path : /opt/cpguard/cpglfd/configs/jails.available/
Upload File :
Current File : //opt/cpguard/cpglfd/configs/jails.available/ftp.yaml

jails:
  - name: "ftp-server"
    enabled: true
    log_paths:
      - "/var/log/messages"
      - "/var/log/kern.log"
      - "/var/log/syslog"
    
    # 👇 "patterns" (list of strings) becomes "rules" (list of objects)
    rules:
      # VSFTPD
      - regexp: "FAIL LOGIN: Client \"(?P<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)\""
      
      # Pure-FTPd
      - regexp: "\\(?@(?P<ip>\\d+\\.\\d+\\.\\d+\\.\\d+)\\) \\[WARNING\\] Authentication failed"
      
      # ProFTPD (All Login Failure Types)
      # Matches: "no such user", "Incorrect password", "Account disabled", etc.
      - regexp: "(?i)(?P<ip>\\d+\\.\\d+\\.\\d+\\.\\d+) .* (?:user not authorized for login|no such user|incorrect password|password expired|account disabled|invalid shell:|user in \\S+|limit (?:access|configuration) denies login|not a useralias|maximum login length exceeded)"

    # Global Defaults for this jail
    max_retries: 5
    find_time: "1m"
    ban_time: "1h"

    # Actions remain unchanged
    actions:
      - name: "cpgblock-ftp"
        ban_command: '/usr/bin/cpgcli ip --temp-block {{.IP}} --reason "Blocked by {{.JailName}} due to more than {{.MaxRetry}} abusive access within {{.FindTime}} seconds" --extra " LogFile: {{.LogPath}} | Reason: {{.LogLine}}"'
        unban_command: "/usr/bin/cpgcli ip --temp-block {{.IP}} --remove"