Results 1 to 5 of 5

Thread: Need help about user IP

  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    cPanel/WHM Access Level

    Root Administrator

    Default Need help about user IP

    helo ppl..
    i have some problem.. and i dont know how to fix it..

    this is a problem..
    i run a website, and everybody can register...
    until i find some user spam in my forum...
    so i go to administrative page and want to ban spam user..

    but i notice that every user IP had a same IP
    that is my server IP..


    i test with php scripts to show ip address..
    it's show my IP address is server ip, its should be my ip from internet provider
    but i put that script to another server..
    it's show my ip from provider, not IP from server i host..

    what is going on?
    i really dont know... there's something wrong with PHP, or whm config, or something else?
    Last edited by ijoo; 08-06-2012 at 09:19 AM.

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    10,122
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Need help about user IP

    What forum software are you using?

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Need help about user IP

    Quote Originally Posted by Infopro View Post
    What forum software are you using?
    i try xenforo.. phpbb..

    its show same result..
    but i try HTTP_X_forward it's show my real ip

    but most of php software/engine/cms using getenv(remote_addr) or $_SERVER(remote_addr)
    and this scripts show my server ip not my internet provider ip

    so i thinks the problem it's from php modules cofiguration..
    but i dont know what module i have install/uninstall from eazyapache..

    i try this scripts
    <?php
    $remoteaddr=$_SERVER["REMOTE_ADDR"];
    $xforward= $_SERVER["HTTP_X_FORWARDED_FOR"];
    if (empty($xforward)) {
    //user is NOT using proxy
    echo "You are not using proxy, your real IP address is: $remoteaddr";
    }
    else {
    echo "You are using a proxy, your proxy server IP is $remoteaddr while your real IP address is $xforward";
    }
    ?>
    result:
    You are using a proxy, your proxy server IP is 210.x.x.x while your real IP address is 203.x.x.x

    ps:
    nslookup for myweb.com = 210.x.x.x
    myipaddress = 203.x.x.x and im not using proxy
    Last edited by ijoo; 08-06-2012 at 07:11 PM.

  4. #4
    Registered User
    Join Date
    Aug 2012
    Posts
    3
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Need help about user IP

    solve!

    thanks...

  5. #5
    cPanel Staff cPanelTristan's Avatar
    Join Date
    Oct 2010
    Location
    somewhere over the rainbow
    Posts
    7,611
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Need help about user IP

    Hello,

    Would you be able to tell us how you solved the issue for future reference?

    Thanks!
    cPResources: Support Options | More Support Options | Forums Search | cPanel.net Site Search | Mailing Lists(Alt) | Docs
    -- Tristan, Technical Analyst III, Forums Specialist, cPanel Tech Support

    Submit a ticket | Check an existing ticket

Similar Threads

  1. Replies: 2
    Last Post: 02-03-2011, 02:42 PM
  2. ProFTPD new user 530 login error/no such user
    By Guile in forum cPanel & WHM Discussions
    Replies: 14
    Last Post: 02-16-2009, 04:32 PM
  3. Replies: 1
    Last Post: 06-03-2008, 12:21 PM
  4. Is /home/user/mail/user/inbox legacy junk?
    By GTFO in forum E-mail Discussions
    Replies: 0
    Last Post: 08-15-2007, 12:40 PM
  5. Urgent!! user sending mailing as a gmail user!!
    By bsasninja in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 08-25-2006, 01:31 PM