473,385 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

IP from private range?

Hello

As in the topic. Is it possible to get client's IP (private, you know 10.*..
172.16.* 192.168.*...) not proxy or NAT address (using cookies maybe) ? I
saw few pages that can do this but I'm not sure if they used PHP and/or
something else so here's my wuestion: any ideas how ?

Regards.
Jul 17 '05 #1
10 5402
lecichy wrote:
Hello

As in the topic. Is it possible to get client's IP (private, you know 10.*..
172.16.* 192.168.*...) not proxy or NAT address (using cookies maybe) ? I
saw few pages that can do this but I'm not sure if they used PHP and/or
something else so here's my wuestion: any ideas how ?


Not always. I know some HTTP proxies add an X-forwarded-for: header with
the true IP. The theory behind NAT though is that anything inside the
firewall should be invisible for security purposes.

Jul 17 '05 #2

Uzytkownik "Kevin Thorpe" <ke***@pricetrak.com> napisal w wiadomosci
news:3f***********************@news.easynet.co.uk. ..
lecichy wrote:
Hello

As in the topic. Is it possible to get client's IP (private, you know 10.*.. 172.16.* 192.168.*...) not proxy or NAT address (using cookies maybe) ? I saw few pages that can do this but I'm not sure if they used PHP and/or
something else so here's my wuestion: any ideas how ?


Not always. I know some HTTP proxies add an X-forwarded-for: header with
the true IP. The theory behind NAT though is that anything inside the
firewall should be invisible for security purposes.


Sure, I know theory of NAT, but in my specific case, some foreign sites can
check my private IP so we know that it's possible in my network. Knowing
that, what can be done with this forwarding ? On my site I can get my NAT's
IP and port. So this port identyfies my machine ? And if smoeting should be
forwarded then the destination address should look like
$REMOTE_ADDR:$REMOTE_PORT using apache variables ?
Jul 17 '05 #3
"lecichy" <co*****@vline.pl> wrote in message
news:bn**********@nemesis.news.tpi.pl...

Uzytkownik "Kevin Thorpe" <ke***@pricetrak.com> napisal w wiadomosci
news:3f***********************@news.easynet.co.uk. ..
lecichy wrote:
Hello

As in the topic. Is it possible to get client's IP (private, you know 10.*.. 172.16.* 192.168.*...) not proxy or NAT address (using cookies maybe) ?
I
saw few pages that can do this but I'm not sure if they used PHP
and/or something else so here's my wuestion: any ideas how ?


Not always. I know some HTTP proxies add an X-forwarded-for: header with
the true IP. The theory behind NAT though is that anything inside the
firewall should be invisible for security purposes.


Sure, I know theory of NAT, but in my specific case, some foreign sites

can check my private IP so we know that it's possible in my network. Knowing
that, what can be done with this forwarding ? On my site I can get my NAT's IP and port. So this port identyfies my machine ? And if smoeting should be forwarded then the destination address should look like
$REMOTE_ADDR:$REMOTE_PORT using apache variables ?


Can you post the URLs to those foreign sites able to do this?

--
Dag.
Jul 17 '05 #4

Użytkownik "Dag Sunde" <da******@orion.no.way> napisał w wiadomości
news:3f******@news.wineasy.se...
Can you post the URLs to those foreign sites able to do this?


Here's the only one i could get right now:
http://www.thedonkeynetwork.com/connection_test (I don't know what this site
is actually about but what is important is that it shows my private IP
instead of a proxy or NAT as every normal site)
This link and few other I found on my ISP's local newsgrups ( in a different
context ) I cannot give any others right now as I did not pay much attention
to that until now.

And there was one more, it was some kind of a banner or commercial flash
animation on one of the biggest web portals and when I moved mouse coursor
over it, I could see in status bar a link to some script ( can't remeber if
it was PHP or sth else) that conatained my private IP as a variable
Jul 17 '05 #5
lecichy wrote:
Can you post the URLs to those foreign sites able to do this?


Here's the only one i could get right now:
http://www.thedonkeynetwork.com/connection_test


If you are behind a NAT firewall then something's configured wrongly. It
correctly shows the firewall address for me.

Jul 17 '05 #6
lecichy <co*****@vline.pl> wrote:
Can you post the URLs to those foreign sites able to do this?


Here's the only one i could get right now:
http://www.thedonkeynetwork.com/connection_test (I don't know what this site
is actually about but what is important is that it shows my private IP
instead of a proxy or NAT as every normal site)
This link and few other I found on my ISP's local newsgrups ( in a different
context ) I cannot give any others right now as I did not pay much attention
to that until now.


This url probably uses the http-client-ip of x-forwarded-for headers (if
they are present). You can figure this out for your self by requesting a
php page and just do a phpinfo() on that page. You'll see all headers
sent by your browser and can find the header containing you private
address yourself

--

Daniel Tryba

Jul 17 '05 #7
"Kevin Thorpe" <ke***@pricetrak.com> wrote in message
news:3f***********************@news.easynet.co.uk. ..
lecichy wrote:
Can you post the URLs to those foreign sites able to do this?


Here's the only one i could get right now:
http://www.thedonkeynetwork.com/connection_test


If you are behind a NAT firewall then something's configured wrongly. It
correctly shows the firewall address for me.


So it does for me.

I suspect kevin is right... Something is open.
What kind of OS/software does your NATing and Firewalling?
Jul 17 '05 #8

Użytkownik "Dag Sunde" <da******@orion.no.way> napisał w wiadomości
news:3f********@news.wineasy.se...
"Kevin Thorpe" <ke***@pricetrak.com> wrote in message
news:3f***********************@news.easynet.co.uk. ..
lecichy wrote:
>Can you post the URLs to those foreign sites able to do this?

Here's the only one i could get right now:
http://www.thedonkeynetwork.com/connection_test


If you are behind a NAT firewall then something's configured wrongly. It
correctly shows the firewall address for me.


So it does for me.

I suspect kevin is right... Something is open.
What kind of OS/software does your NATing and Firewalling?

What I know about my NAT is that it is a machine running Debian
(squid/2.5.STABLE4)

But anyway. Its configuration is not exactly the point. Using this
phpinfo() taht Daniel Tryba suggested I found my private IP in X-forwarded
for and thats OK in some way. What if I want to use data in headers like IP,
OS etc. in further php processing scripts?. Extracting it from this
phpinfo() output page isn't very effective so is there any other way to get
only headers sent by browser ?

Jul 17 '05 #9
Thanks all!

I found out that on this phpinfo() site appriopriate names of variables
corresponding to each header are given in one of the tables so echo this and
echo that and I got what I want.

Thanks again!
Jul 17 '05 #10
What I know about my NAT is that it is a machine running Debian
(squid/2.5.STABLE4)


Then that must be a PROXY, not a true NAT.

Jul 17 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Scott Brady Drummonds | last post by:
Hi, everyone, I'm still learning Python as I develop a medium-sized project. From my previous experience with C++, I've burnt into my mind the notion of information hiding. I'm having trouble...
7
by: Xah Lee | last post by:
Today we'll be writing a function called Range. The Perl documentation is as follows. Perl & Python & Java Solutions will be posted in 48 hours. This is Perl-Python a-day. See...
4
by: IMS.Rushikesh | last post by:
Hi All, I am trying to execute below code but it gives me an COMException ///// Code Start //// public string GetName(Excel.Range range) { try { if (range.Name != null)
5
by: Chris | last post by:
Hey all. Anyone who is familiar with Python programming knows that you can have code like this: list = This code puts all the items processed by the for loop in a list plus 1. Is there a way...
3
by: toton | last post by:
Hi, I want ro iterate over a few container class within a range specified, instead of begin & end. How to construct a range class, which takes start & end, and iteration is available within that...
23
by: Ben Voigt | last post by:
I have a POD type with a private destructor. There are a whole hierarchy of derived POD types, all meant to be freed using a public member function Destroy in the base class. I get warning C4624....
86
by: jopperdepopper | last post by:
Hi, finally giving php 5 a go, and going over the new approach to classes. Can someone clarify the public, private and protected to me? I quote the php manual: "The visibility of a property or...
85
by: Russ | last post by:
Every Python programmer gets this message occasionally: IndexError: list index out of range The message tells you where the error occurred, but it doesn't tell you what the range and the...
0
by: iain654 | last post by:
I have finally worked out how to automatically send a range of cells in the body of an email using Outlook but it is very clumsy and I have to build up the email using the limit of line...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.