Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

iptables, audit.log & Brute force detection

Discussion in 'Security' started by JeffPaetkau, Nov 13, 2014.

  1. JeffPaetkau

    JeffPaetkau Member

    Joined:
    May 5, 2014
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    On my server I have iptables setup so ssh (on port 22) only allows connections from a limited set of IP's (tested such that when I comment out my IP I can't connect). However, I notice in audit.log thousands of messages like:

    type=USER_AUTH msg=audit(1415905373.817:1993316): user pid=28071 uid=0 auid=0 ses=29944 msg='op=PAM:authentication acct="root" exe="/usr/sbin/sshd" hostname=192.126.120.93 addr=192.126.120.93 terminal=ssh res=failed'

    and in the messages log hundreds of:

    Nov 13 08:30:02 host PAM-hulk[22289]: Brute force detection active: 580 LOGIN DENIED -- TOO MANY FAILURES -- IP TEMP BANNED

    also aureport reports:

    Number of logins: 6
    Number of failed logins: 6835
    Number of authentications: 12
    Number of failed authentications: 41589

    Does anyone have any ideas on why these invalid attempts are not being blocked by iptables?

    Thanks for any insight.

    Jeff Paetkau
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,888
    Likes Received:
    90
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Change port number to something else. You should find the docs useful I think:
    How to Secure SSH - cPanel Documentation
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. JeffPaetkau

    JeffPaetkau Member

    Joined:
    May 5, 2014
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    Thanks. those are both good suggestions. However, they don't really answer my question which is: why am I seeing these messages at all if iptables is blocking port 22?

    Jeff
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice