Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Catching my public IP

Status
Not open for further replies.

arlequin

Programmer
Sep 21, 1999
232
UY
Hello, there

A friend o' mine asked me if it was possible to get the public IP address of his web server from inside, using ASP.

He's running IIS behind a router, so, when he requests the LOCAL_ADDR ASP Server Variable, he gets the web server's local IP address.

Is there any possibility to obtain the public address of the web server?

Thanks a lot,

Arlequín
arlequin@montevideo.com.uy
 
foxlady,

Perhaps I didn't explain myself clear enough.

Anyway, I have to admit that my question wasn't clever.
It's impossible to know the public IP address of a web server behind a router 'cause there's not public IP for the web server.

The web server is inside the LAN, behind the router. The only machine which has two network interfaces is the router. It's the only machine with public address.

Then, there's no public address for the web server. The only IP address the web server is aware of, is its local IP address.

Sorry and thank you for reading & answering.

Arlequín
arlequin@montevideo.com.uy
 
ur router will tell u ur WAN address....or
visit (right hand side-top corner)
IP wont change...look at it ones and ur done!

> need more info?
:: don't click HERE ::
 
you can also use a tracert command and first hop will be your machine, second hop will be your router
 
why do u need this IP ? because if you need this IP to be able to access it from outside the network then you should use the router IP, and in the router settings forword the requests to port 80 on the router to port 80 of the machine that has your IIS server (Port forwarding)... If your machine has dynamic IP, you can use to keep track of the IP, or any other services.. and if you need to see what IP your router has, try using I am hosting 2 sites on my machine, and its behind a router and firewall using (using free account)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top