Click to See Complete Forum and Search --> : Determining Real IP Address of Firewall
sajidraza
06-29-2001, 03:44 PM
I'm using a cable modem based internet service plugged into a small Linksys DSL/Cable router with built in DHCP server and ethernet switch.
Basically, I enabled port forwarding on the router to allow external users to get in to a machine on the private network. Unfortunately, the IP address handed out by the cable company is dynamic. I need to be able to determine my real IP (i.e. the router's real IP).
I was thinking of writing a small perl script (executing in a cron job) that opens up a cgi based page on a public machine on the internet that records the remote host header then have that perl script email me the address.
I was hoping that someone could tell me a better was of doing this using some sort of IP family protocol such as ICMP to determine the true address of my firewall without resorting to trickery.
namgor
06-29-2001, 05:01 PM
should have posted this on network foruM? http://www.sharkyforums.com/ubb/smile.gif
------------------
DHAHL3seasons GP:73 G:121 A:55 Pts:176 GWG:12 +/-:184
UWSWA1season GP:9 G:12 A:8 Pts:20 GWG:3 +/-:-3
uwcdc.com (http://www.uwcdc.com) or namgor.com (http://www.namgor.com)
Grizzly
06-29-2001, 06:43 PM
Simple...go here:
http://www.showmyip.com/
That's your IP.
Pinky
06-29-2001, 07:52 PM
Originally posted by Grizzly:
Simple...go here:
http://www.showmyip.com/
That's your IP.
Hey that's pretty cool, Griz'.
Doesn't that router also come with the ability to manage it from a browser on a computer connected to it? That would tell the external IP as well.
------------------
Embrace this moment. Remember we are eternal. All this pain is an illusion.
[the man] (http://darksavior.net/~pinky/) [the real man] (http://inst.augie.edu/~gmgunder) [the specs] (http://darksavior.net/~pinky/pinkyspecs.txt)
sajidraza
06-30-2001, 10:47 PM
I think I know how to do what showmyip.com does. From what I can see all it does is print out a remote host http header in a cgi script. That's easy.
What I can't figure out how to do is to actually query the router for the IP address of its external interface. How would I get that accomplished?
Grizzly
07-01-2001, 10:12 PM
Originally posted by sajidraza:
I think I know how to do what showmyip.com does. From what I can see all it does is print out a remote host http header in a cgi script. That's easy.
What I can't figure out how to do is to actually query the router for the IP address of its external interface. How would I get that accomplished?
Actually it uses a built-in PHP variable http://www.sharkyforums.com/ubb/biggrin.gif
But yeah...that's exactly what your IP is. Your router's external IP is exactly what that web page is telling you. Any computer on your LAN, when browsing the web, will share that same IP.
Make sense?
But also, as Pinky alluded to above, you can access your router's control panel and view it from there as well:
Simply click here: http://192.168.1.1/
Login, then click on the "status" tab up top.
All information listed under "WAN" is your router's external config.
[This message has been edited by Grizzly (edited July 01, 2001).]