The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Limit Cpanel Access Logs

Discussion in 'Security' started by keat63, Jul 7, 2015.

  1. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    765
    Likes Received:
    20
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Is there a way to restrict what is written to Cpanel Access Log.
    It would help me if i could filter out my own connections, so that it only logs IP's that are not mine.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,684
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. quizknows

    quizknows Well-Known Member

    Joined:
    Oct 20, 2009
    Messages:
    940
    Likes Received:
    55
    Trophy Points:
    28
    cPanel Access Level:
    DataCenter Provider
    These logs are very important in security incidents and I would not recommend trying to limit what is written to them.

    You have a couple options to go through them; if you're going through them "after the fact" you can simply use the grep command to view entries only from your IP. Otherwise if you want to watch in "real time" you can simply pipe the tail -f command through a grep while logged into SSH such as:
    Code:
    # tail -f /usr/local/cpanel/logs/access_log | grep 123.123.123.123
    
    This will cause only lines containing your IP to be output to the terminal until you kill the command with ctrl-c
     
Loading...

Share This Page