Closed Thread
Results 1 to 4 of 4

Thread: Shared ip

  1. #1
    anth_199360 is offline x10Hosting Member anth_199360 is an unknown quantity at this point
    Join Date
    Jan 2011
    Posts
    2

    Shared ip

    is this a problem with my site or the host?
    every user has the same ip, and i dont know who is who
    can it be changed on the host?
    or can i do something with my site,

  2. #2
    vishal's Avatar
    vishal is offline -::-X10 Guru-::- vishal has a brilliant futurevishal has a brilliant future
    Join Date
    Nov 2009
    Location
    INDIA
    Posts
    5,254

    Re: Shared ip

    No, IP cannot be changed.
    Regards ~ Vishal
    Giving Reputation (at bottom of my post ) is the best way to encourage the person who helped you on forums.

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,633

    Re: Shared ip

    If you are saying that one of your scripts checks the IP of your users, and that the script shows all the same IPs, then that is a result of the load distributing setup that x10hosting uses for their servers.

    PHP, try using:

    HTTP_X_FORWARDED_FOR
    HTTP_X_REAL_IP
    Last edited by descalzo; 01-19-2011 at 08:59 AM.
    Nothing is always absolutely so.

  4. #4
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,504

    Re: Shared ip

    Note that both come from the X-Forwarded-For and X-Real-IP HTTP headers, respectively, and can thus be spoofed. It shouldn't matter when using the load balancing server (since they'll add the clients real IP to the headers), but if you ever migrate your code to another server that doesn't use proxied load balancing, you could be opening a hole in your security. Just to be safe, you might want to combine both the real and forwarded remote addresses.

    PHP Code:
    function remoteAddr() {
        static 
    $remote_addr null;
        if (
    is_null($remote_addr)) {
            
    $remote_addr $_SERVER['REMOTE_ADDR'];
            foreach (array(
    'HTTP_CLIENT_IP''HTTP_X_FORWARDED_FOR''HTTP_X_REAL_IP') as $hdr) {
                if (isset(
    $_SERVER[$hdr])) {
                    
    $remote_addr .= '/' $_SERVER[$hdr];
                    break;
                }
            }
        }
        return 
    $remote_addr;

    This won't help you with load-balanced proxies that the client might use, as the remote address might vary with each request, which will appear to be a hijack attempt.
    Last edited by misson; 01-20-2011 at 04:29 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

Closed Thread

Similar Threads

  1. Shared ip
    By anth_199360 in forum Free Hosting
    Replies: 1
    Last Post: 01-19-2011, 07:23 AM
  2. How to use shared ssl
    By rakesh1248kumar98 in forum Free Hosting
    Replies: 1
    Last Post: 06-24-2010, 09:30 PM
  3. Shared SSL
    By theansweris42 in forum Free Hosting
    Replies: 0
    Last Post: 06-07-2010, 04:54 PM
  4. Shared SSL
    By metamorfosis.team in forum Free Hosting
    Replies: 1
    Last Post: 10-15-2009, 04:22 PM
  5. shared ssl available?
    By africarox in forum Free Hosting
    Replies: 1
    Last Post: 01-07-2009, 03:15 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers