1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Server Logging Question

Discussion in 'BlackHat Lounge' started by maxchen, Apr 3, 2017.

  1. maxchen

    maxchen Jr. VIP Jr. VIP

    Joined:
    Oct 7, 2015
    Messages:
    733
    Likes Received:
    283
    Gender:
    Male
    Location:
    BHW
    Hi. I got some technical question about ubuntu server.

    I wonder where will log my ip address

    So far i found that

    /var/log/apache2 on access and error log
    /var/log/secure
    btmp

    Is there any other files in server that log ip address of whoever access the server, be it ssh, sftp or web or any other.

    Thanks
     
  2. uncutu

    uncutu Supreme Member

    Joined:
    Aug 6, 2010
    Messages:
    1,460
    Likes Received:
    682
    Code:
    /var/log/auth.log
    That contains a lot more than just plain logins, but logins are in there too. It's protected so you'll need to be root to read it:
    Code:
    sudo less /var/log/auth.log
    You can also run commands like
    Code:
    last
    and
    Code:
    lastlog