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

Implemented Admin Control Panel - Search Users by IP

Discussion in 'Closed Suggestions' started by KozmoK, Jun 8, 2011.

  1. KozmoK

    KozmoK Active Member

    I often have to track down people by IP, and I would like to search by IP address.

    For Example: I have a script on cron that calculates how many SYN_RECV my server is getting, if over a certain threashold - it sends me an email so I can find out why they are trying to DDOS me, or if they are having connection issues. I'd like to know what user that is easily.

    P.S. I didnt make the cron script picked it up years ago from somewhere.
    netstat -ntp
    Active Internet connections (w/o servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 **.167.147.104:22 SYN_RECV -
    tcp 0 0 **.167.147.219:22 SYN_RECV -
    tcp 0 0 **.167.147.104:22 SYN_RECV -
    tcp 0 0 **.167.147.121:22 SYN_RECV -
    tcp 0 0 **.167.147.219:22 SYN_RECV -
    if anyone wants this cron script let me know.
    DeltaHF, SchmitzIT and Alien like this.
  2. Alien

    Alien Well-Known Member

    I think IP searches via AdminCP would be extremely helpful, I miss it almost every day.

    I know you can search via database, but I think it needs to make it into the AdminCP.
    erich37 and SchmitzIT like this.
  3. DeltaHF

    DeltaHF Well-Known Member

    Wow. I'm really disappointed to discover this isn't supported in XF, despite all the other excellent moderation controls found in the software. Is there even a way to view all of a user's IP addresses from their profile or the Admin CP? I can't seem to find anything in the demo... This sort of thing is extremely important when dealing with troublesome users, and as a large forum owner it's something my staff and I have to deal with on a daily basis.

    Hopefully there will be improvements in this area with 1.1...
    rootsxrocks likes this.
  4. Floris

    Floris Guest

    XenForo stores the IP as longip (INT).

    You can go to phpmyadmin and do a search for it.

    disclaimer: this convert script is not written to be secure.. Just an example, use behind .htaccess or rewrite it to avoid exploiting.
    dir: longip/ file: index.php
    call with: index.php?ip=
    if ($_REQUEST['ip']) {
    $ip htmlspecialchars($_REQUEST['ip'], ENT_QUOTES);
    } else {
    $ip "";
    <form action="index.php" method="get">
    <label>IPv4 Address: </label>
    <input type="text" name="ip" value="<?php echo $ip?>" />
    <input type="submit" value="Convert to LongIP" />

    if (
    $long == -|| $long === FALSE) {
    "Invalid IP, please try again <br />";
    } else {
    "Ipv4: $ip<br />";
    "LongIP: $long <br />";
    write down the number ..

    In PHPMyAdmin you can do:

    You get a page back with all the entries with that unique longip.

    Let's say you get 3 rows with user_id 1 and 12 ..

    To get the username for id 12 (or 1) do:

    SELECT * FROM `xf_user` WHERE `user_id` = 12
    Resulting in a single row with the column username saying the name ..

    Now, if someone knows how to put this into 'xenforo' language, that be great :)
    DeltaHF likes this.
  5. Floris

    Floris Guest

  6. Kier

    Kier XenForo Developer Staff Member

    An IP search tool is in XF 1.1.
    Tessa, Garamond, dieketzer and 7 others like this.
  7. Floris

    Floris Guest

    Even better Until then, a manual lookup will do just fine.
  8. DeltaHF

    DeltaHF Well-Known Member

    That's great to hear! Looking forward to it.
  9. Dean

    Dean Well-Known Member

    It would be incredibly handy to be able to put in a partial IP, or an IP range.

    I'd really like to block some IP ranges, but I really don't want to block any of my actual users.
    rootsxrocks and RastaLulz like this.
  10. rootsxrocks

    rootsxrocks Active Member

    Ah hah Glad I am not the only one that ran into this issue. Running scripts is a PITA just to check wither a user is a genuine target market that is having difficulty confirming the Email. I looked Back and forth and all I could find was the banned and discouraged list.
  11. Dean

    Dean Well-Known Member

    DeltaHF likes this.

Share This Page