Click to See Complete Forum and Search --> : Find IP address of router (non local)
red_over_blue
03-14-2003, 01:02 AM
Hi,
Hopefully there is a simple answer to this question. I have a netgear router that gets it's WAN IP from my ISP via DHCP.
However, I SSH from school, and since my IP changes every other day, I have to open a browser from my home computer and see what IP my ISP has given it, write it down, and take it to school so I can SSH back.
My question is, how can I determine the WAN IP of my router from my home network?
ie.
john@limbo ~ $ whatiswanip 192.168.0.1
215.66.222.222
I tried things like traceroute, nslookup, etc, but can't find something that fits my needs.
If I could get this to work, I could make a cron job to perform this command, output the text to a file, then scp or something the file to school.
Thanks for any help.
chrism01
03-14-2003, 12:23 PM
i don't have a standalone router, i use a linux box, but a couple of ideas occur to me.
1) try the lynx browser; its text only, so you should be able to capture the output.
2) Can you run ifconfig against the router?
I'm surprised traceroute doesn't give it???
Anyway, HTH.
JamminJoeyB
03-14-2003, 12:39 PM
Here is an idea. Don't know if it is possible and some one else here maybe able to point out something else.
Set up an account with DynDns.org, yourhome.com. Much easier to remember.
Set up an apache web server and password protect it. (Saw that article on here somewhere)
Set up a webpage to get the ip of your router and post it. Ok this maybe harder then it sounds, but it's just an idea.
With the password protected apache your ip is safe from anyone just nabbing it and you have a way to get it from anywhere.
There maybe more stuff involved to get this going, but it's an idea. Trying to think outside the box here.
I have been reading on ssh and I need to take the time to experiment with it. I would be in the same situation as you if I wanted to ssh from work everyday.
red_over_blue
03-14-2003, 01:46 PM
Thanks for the suggestions. The only problem with links is that the router is password protected and links I can't seem to get past the password with links.
If you think traceroute should be able to resolve the IP, I will do more research into that and see if I was doing something wrong previously.
Thanks again.
Seminole
03-18-2003, 03:24 AM
Check my post in this thread
http://justlinux.com/forum/showthread.php?s=&threadid=94149
TZO works wonders! Without it I would be in your situation, writing down IPs etc. I have been using them for a long time and it's SO much easier than remembering IPs (even though mine hardly ever change). I SSH back to my box nightly.
The client is very small and can be set to send your new IP to their DNS servers whenever you want. Ever minute, every day, every 30 days...
It costs 24 dollars a year... Not bad if you ask me...
The alternative is to have a website with page on it that only you would visit. Then you could have the website capture on the global variable of the visitng IP, place it in a database (or just write it to a text file). Then you could view another page which would read the file. However, you would have to visit the first page at least once a day (prior to leaving your house) to keep it up to date..
The client is MUCH easier and works under Linux.....