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.

how can i check what ips are linking my server now?

Discussion in 'General Discussion' started by meeti, May 13, 2008.

  1. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Hi,


    because the load of the server is low but the response speed is slow,

    and i open the website slowly,

    i want to know if any way to check what ips are linking my server now?



    thanks
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    This should do it:

    netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -nr |more
     
  3. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Hi,


    there is a number before each ip
    ex:
    44 122.132.2.7
    35 231.4.63.6

    what is the meaning of the number?


    thanks
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    The number of connections that IP has to your server...
     
  5. meeti

    meeti Well-Known Member

    Joined:
    Dec 25, 2007
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16

    Hi,

    the number is calculated within what minutes? 1 minutes? 60 ? or?


    because i check the the load of server is low,

    but http response is slow,

    and i restart httpd from whm,it will ok,

    but some minutes later,it will become slow again.



    thanks
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That simply shows the number of current connections, there's no time frame. You might want to check the full netstat output to see which ports those IP's are connected to (i.e. whether it's httpd or not).
     
  7. kdoublei

    kdoublei Member

    Joined:
    Feb 21, 2007
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    i primarily use c-panel and have been paying companies to monitor my server but i want to do a little more and take over the maintenance myself. where would i enter this code?
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You'd login to your server via SSH to run that command.
     
  9. kdoublei

    kdoublei Member

    Joined:
    Feb 21, 2007
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    ok, now im finding theres an ip with 9 connections. how can i disconnect this ip?
     
  10. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,447
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Block it via your firewall might be the easiest. Not sure why or who that IP is? Might want to check it before blocking it. 9 connections may or may not be a problem.

    A great tool you might look into, http://www.configserver.com/cp/csf.html
     
Loading...

Share This Page