You are here: Re: odd fsockopen behavior « PHP Programming Language « IT news, forums, messages
Re: odd fsockopen behavior

Posted by Gordon Burditt on 12/18/86 11:48

>Any IP address I try to open with fsockopen on a particular server
>seems to use another IP address instead.
>
>eg. I open a socket connection to 192.168.1.1 but the remote_addr that
>the other server sees is 192.168.1.255. It's as if, like I said, the
>IP address I supply to fsockopen is being replaced with another one.

NAT in a firewall or router?
Using a broadcast address for this is kinda wierd.

Describe your network topology, including all the routers and switches.

>Anyway, this is breaking a script of mine. I don't think I can really
>do a lot in PHP to fix this but is there perhaps some way that I can
>detect it?

If there's NAT in use, you can't detect this just from the
server end. You'd have to ask (and trust) the client end to
give you what *it* thinks the IP address is. But Javascript
is often Turned Off (tm).

>Is there some command line parameter that I can pass to
>passthru or something that'll tell me whether or not such a thing is
>happening?
>
>Also, how is this even being done? Could a firewall do this? If so,
>I'm still not even sure how it'd be done...

A firewall with NAT could definitely do this, although it seems its
configuration is a bit wierd.

Gordon L. Burditt

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация