Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Re: Faking an ip?

by orkysoft (Friar)
on Jul 08, 2001 at 22:32 UTC ( #94843=note: print w/replies, xml ) Need Help??

in reply to Re: Faking an ip?
in thread Faking an ip?

Thanks! I only knew about the HTTP_X_FORWARDED_FOR, and never really bothered to find out more, but this can certainly provide me with more accuracy for my program, which uses IPs as a backup method to distinguish between various users (cookies being the primary method).

Replies are listed 'Best First'.
Re: Re: Re: Faking an ip?
by legLess (Hermit) on Jul 09, 2001 at 05:38 UTC
    IPs are not a reliable way to distinguish users or sessions. AOL users, for instance, can use a different IP for each page request. Cookies aren't perfect, but they're better than IPs.

    Credit where it's due: Merlyn made a similar post a couple days ago.

    man with no legs, inc.
      ISPs and other internet providers as well can dynamically assign IP addresses using DHCP. The client machine knows its own IP address because the network tells the client.

      I have never heard of a network routinely changing its clients' IP addresses in midsession, however, and I doubt that it occurs very often.

      Cookies have the disadvantage that users can reject them and browsers can not support them. On the other hand, IP addresses are stable enough to support the session and everyone has one. It's guaranteed.

        Not to get into a flame war (besides, that's a cute photo of you and your dog), but IMHO you're completely wrong. Using IPs for session information is only "guaranteed" to fuck you.

        First point: proxy servers. Many people can share what appears to your script to be the same IP. What if I administer 1,000 machines, all loaded with the same configuration, routed out one proxy server? And what if two of them visit your site? Your session information is toast, and you won't even know it.

        If a browser doesn't support cookies, or rejects them outright, you know right away. Writing cookie-detection scripts in Perl and/or JavaScript is not difficult. You can program your script to respond to that event by using a different scheme or rejecting the request. No such logic is possible with IPs.

        And using IPs as supplemental information with other environmental variables won't help either: if you have an unknown quantity and add it to a known, your result is still unknown, and you have no reason to believe otherwise.

        Granted, no scheme is totally uncrackable. But I think IPs are less secure than most.
        man with no legs, inc.

      I know that. That's why the IP addresses aren't considered by the program. It uses cookies, but if necessary, I can examine the logs myself, which do contain IPs. It tries to look through proxies by reading the X_HTTP_FORWARDED_FOR header (and soon also those other headers :-), to record the 'real' IP (or as much as that's possible), just in case someone would be trying to 'cheat'.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://94843]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2018-05-21 01:48 GMT
Find Nodes?
    Voting Booth?