dynamic ip address - how to get to know my ip address?

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Mon, 07 Jul 2003 23:16:51



Hi there,

my ISP provides me with a dynamic ip address. I'm using a wireless LAN
router made by SMC to connect to the internet. I want to get to know the
public ip address from a computer that is located in the local network
behind the router's firewall. But, of course, the router's NAT replaces the
public ip address with the local one.

How do I get to know the public ip address the ISP gave me?

Currently, I'm not using Linux. But I consider to set up a Linux box that
will be accessible from the internet. I guess, this problem is not
platform-dependent. Unfortunately, my router does not have a telnet
interface or any other interface that would provide me with the public ip
address. Only, if login to the web interface manually, I can see the current
status including the current ip address.

Can I solve this problem with standard TCP/IP tools? "ping" does not give
any evidence -- I was sniffing with Ethereal to miss no information.

Do I need help from an external system that can tell me my ip address? Is
there a service, I can use?

Thanks in advance,

Johannes

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Clive Dov » Mon, 07 Jul 2003 23:56:22



> Hi there,

> my ISP provides me with a dynamic ip address. I'm using a wireless LAN
> router made by SMC to connect to the internet. I want to get to know
> the public ip address from a computer that is located in the local
> network behind the router's firewall. But, of course, the router's NAT
> replaces the public ip address with the local one.

> How do I get to know the public ip address the ISP gave me?

> Currently, I'm not using Linux. But I consider to set up a Linux box
> that will be accessible from the internet. I guess, this problem is
> not platform-dependent. Unfortunately, my router does not have a
> telnet interface or any other interface that would provide me with the
> public ip address. Only, if login to the web interface manually, I can
> see the current status including the current ip address.

> Can I solve this problem with standard TCP/IP tools? "ping" does not
> give any evidence -- I was sniffing with Ethereal to miss no
> information.

> Do I need help from an external system that can tell me my ip address?
> Is there a service, I can use?

> Thanks in advance,

> Johannes

You did not tell us the model number of the SMc router.

A quick review of the SMC site suggests that SMC routers are basically
standard cable/dsl routers which use web based administration to set up
the firmware.

That is, one would use a web browser to access the ip of the router's
firmware then read the parameters from its configuration pages and to
make any changes needed to accept a new computer or operating system as
part of its network.

In Windows, do you use Internet Explorer or Netscape to access the
router?   If so, you can use a browser such as Konqueror or Mozilla or
Opera in linux to do the same thing.  

 
 
 

dynamic ip address - how to get to know my ip address?

Post by David Efflan » Tue, 08 Jul 2003 00:01:57



> Hi there,

> my ISP provides me with a dynamic ip address. I'm using a wireless LAN
> router made by SMC to connect to the internet. I want to get to know the
> public ip address from a computer that is located in the local network
> behind the router's firewall. But, of course, the router's NAT replaces the
> public ip address with the local one.

> How do I get to know the public ip address the ISP gave me?

There are various dynamic DNS services (web search for 'dns hosting').  I
use no-ip.com.  They have Windows and Unix clients that can run in the
background so they can periodically grab your connecting internet IP.  
Although, I hacked my Dlink gateway firmware so I can monitor its
WAN IP from its login page with a Perl LWP script without having to login,
and just update DNS when necessary.

I also have a wireless SMC router, but it has hardware/firmware problems
that make it not worth messing with.

Another option, if you have an internet web host somewhere, is to write
your own CGI that you tickle with wget occasionally and stores your IP in
a file you can access from anywhere.  But it is simpler in the long run to
use dynamic DNS (so you can configure clients for a fixed name).

--
David Efflandt - All spam ignored  http://www.de-srv.com/
http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Ian Northeas » Tue, 08 Jul 2003 00:04:29



> Hi there,

> my ISP provides me with a dynamic ip address. I'm using a wireless LAN
> router made by SMC to connect to the internet. I want to get to know the
> public ip address from a computer that is located in the local network
> behind the router's firewall. But, of course, the router's NAT replaces the
> public ip address with the local one.

> How do I get to know the public ip address the ISP gave me?

> Currently, I'm not using Linux. But I consider to set up a Linux box that
> will be accessible from the internet. I guess, this problem is not
> platform-dependent. Unfortunately, my router does not have a telnet
> interface or any other interface that would provide me with the public ip
> address. Only, if login to the web interface manually, I can see the current
> status including the current ip address.

> Can I solve this problem with standard TCP/IP tools? "ping" does not give
> any evidence -- I was sniffing with Ethereal to miss no information.

> Do I need help from an external system that can tell me my ip address? Is
> there a service, I can use?

www.whatismyip.com does this.

You could try a little script which issues "wget
http://www.whatismyip.com/" and then parses the (simple) resulting
index.html.

This will work regardless of what device is doing the NAT and whether
you have any access to it.

Regards, Ian

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Neil W Ricker » Tue, 08 Jul 2003 00:53:19



>my ISP provides me with a dynamic ip address. I'm using a wireless LAN
>router made by SMC to connect to the internet. I want to get to know the
>public ip address from a computer that is located in the local network
>behind the router's firewall. But, of course, the router's NAT replaces the
>public ip address with the local one.
>How do I get to know the public ip address the ISP gave me?

That's hard.

Quote:>Currently, I'm not using Linux. But I consider to set up a Linux box that
>will be accessible from the internet. I guess, this problem is not
>platform-dependent. Unfortunately, my router does not have a telnet
>interface or any other interface that would provide me with the public ip
>address. Only, if login to the web interface manually, I can see the current
>status including the current ip address.

My router allows telnet.  I use an expect script to login and
check the IP address.  Maybe you can use an expect script and
lynx to login to the web interface.

Quote:>Do I need help from an external system that can tell me my ip address? Is
>there a service, I can use?

That's what I did before I came up with the expect script for
telnet.  I would "ssh" to a system where I had access, and there run
the command "echo $SSH_CLIENT".
 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 01:22:14


Quote:> You did not tell us the model number of the SMc router.

> A quick review of the SMC site suggests that SMC routers are basically
> standard cable/dsl routers which use web based administration to set up
> the firmware.

> That is, one would use a web browser to access the ip of the router's
> firmware then read the parameters from its configuration pages and to
> make any changes needed to accept a new computer or operating system as
> part of its network.

> In Windows, do you use Internet Explorer or Netscape to access the
> router?   If so, you can use a browser such as Konqueror or Mozilla or
> Opera in linux to do the same thing.

Hi Clive,

thanks for your answer. My SMC router is a SMC 2804 WBR model.
As I wrote, I am able to retrieve my public ip address manually (using a
browser). I'm looking for a way to do it automatically. Unfortunately, I
have to login before I can see the on-line status.

Johannes

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 01:36:56


Hi David,
thanks for the answer.
See my comments inline...

Quote:> There are various dynamic DNS services (web search for 'dns hosting').  I
> use no-ip.com.  They have Windows and Unix clients that can run in the
> background so they can periodically grab your connecting internet IP.

My router has a built-in support for dynamic DNS service TZO. But it is not
a free service. I will not use this service often, so I don't want to spend
25 bucks on it. Actually, I don't want to use any of these services. I just
want to sent a e-mail to my mailbox, each time I dial in.

Quote:> Although, I hacked my Dlink gateway firmware so I can monitor its
> WAN IP from its login page with a Perl LWP script without having to login,
> and just update DNS when necessary.

That sounds interesting! If I were able to modify my login page of my
router's web interface, I could place the current ip address on this page.
This is brilliant. But I don't know how to hack my firmware.Sounds risky
somehow...

Quote:

> I also have a wireless SMC router, but it has hardware/firmware problems
> that make it not worth messing with.

I had some problems with firmware, too. This seems to be a big problem of
SMC. The model I have is a SMC 2804 WBR. There was a firmware upgrade in the
beginning of June. I installed it because they promised to support WPA.
Unfortunately, after applying this firmware upgrade WEP did not work any
more. It took two weeks until they released a new firmware fix, although
they were aware of the problem one day after the erroneous firmware was
released. (I called them and they already knew.)
Quote:> Another option, if you have an internet web host somewhere, is to write
> your own CGI that you tickle with wget occasionally and stores your IP in
> a file you can access from anywhere.  But it is simpler in the long run to
> use dynamic DNS (so you can configure clients for a fixed name).

> --
> David Efflandt - All spam ignored  http://www.de-srv.com/
> http://www.autox.chicago.il.us/  http://www.berniesfloral.net/
> http://cgi-help.virtualave.net/  http://hammer.prohosting.com/~cgi-wiz/

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 01:39:16


Quote:> www.whatismyip.com does this.

> You could try a little script which issues "wget
> http://www.whatismyip.com/" and then parses the (simple) resulting
> index.html.

> This will work regardless of what device is doing the NAT and whether
> you have any access to it.

> Regards, Ian

Ian,

thank you very much for this link. This is what I was looking for!
You saved my day! I appreciate your help.

Johannes

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 02:00:11


Quote:> >Currently, I'm not using Linux. But I consider to set up a Linux box that
> >will be accessible from the internet. I guess, this problem is not
> >platform-dependent. Unfortunately, my router does not have a telnet
> >interface or any other interface that would provide me with the public ip
> >address. Only, if login to the web interface manually, I can see the
current
> >status including the current ip address.

> My router allows telnet.  I use an expect script to login and
> check the IP address.  Maybe you can use an expect script and
> lynx to login to the web interface.

> >Do I need help from an external system that can tell me my ip address? Is
> >there a service, I can use?

> That's what I did before I came up with the expect script for
> telnet.  I would "ssh" to a system where I had access, and there run
> the command "echo $SSH_CLIENT".

Hi Neil,

I haven't heard of an expect script before. Is this kind of a response file
(like you can use for automatic installations)? If I know what is is, I will
give a try. Because this seems to be the easiest way to retrieve the ip
address without using the internet itself. Thanks, Mister.

If using the internet, asking www.whatismyip.com is easier to use than using
for a SSH server, I have access to. (By the way, the link to this service
was given to me as an answer to my posting, too. Thanks, Ian!)

I will look for some information about expect scripts. If you can provide me
a link to some documentation, I would be very grateful.

Thanks again,

Johannes

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Bit Twiste » Tue, 08 Jul 2003 02:06:21



> I haven't heard of an expect script before. Is this kind of a response file
> (like you can use for automatic installations)? If I know what is is, I will
> give a try. Because this seems to be the easiest way to retrieve the ip
> address without using the internet itself. Thanks, Mister.

> If using the internet, asking www.whatismyip.com is easier to use than using
> for a SSH server, I have access to. (By the way, the link to this service
> was given to me as an answer to my posting, too. Thanks, Ian!)

> I will look for some information about expect scripts. If you can provide me
> a link to some documentation, I would be very grateful.

try     man expect      on you linux box.

expect will let you script commands to an interactive session.
It will not navigate a web page unless you can use keyboard keys to
navigate the webpage.

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 02:11:58


Quote:> try     man expect      on you linux box.

> expect will let you script commands to an interactive session.
> It will not navigate a web page unless you can use keyboard keys to
> navigate the webpage.

Does this include the "tab" key? Then it might work!
 
 
 

dynamic ip address - how to get to know my ip address?

Post by Bit Twiste » Tue, 08 Jul 2003 02:18:04



>> try     man expect      on you linux box.

>> expect will let you script commands to an interactive session.
>> It will not navigate a web page unless you can use keyboard keys to
>> navigate the webpage.

> Does this include the "tab" key? Then it might work!

using pull down menuse might be kinda tough.
 
 
 

dynamic ip address - how to get to know my ip address?

Post by Johannes Lebe » Tue, 08 Jul 2003 02:50:45





> >> try     man expect      on you linux box.

> >> expect will let you script commands to an interactive session.
> >> It will not navigate a web page unless you can use keyboard keys to
> >> navigate the webpage.

> > Does this include the "tab" key? Then it might work!

> using pull down menuse might be kinda tough.

Fortunately, it's simple page. No JavaScript and simple input fields only.
But it consists of frames... I guess lynx is not able of handling frames, is
it?
 
 
 

dynamic ip address - how to get to know my ip address?

Post by James Knot » Tue, 08 Jul 2003 02:55:57



> How do I get to know the public ip address the ISP gave me?

Check the SMC manual.  It may tell you how.  Failing that, go to a site such
as www.grc.com, which will report the address it sees for you.
--

Fundamentalism is fundamentally wrong.


james.knott.

 
 
 

dynamic ip address - how to get to know my ip address?

Post by Ian Northeas » Tue, 08 Jul 2003 04:18:02






> > >> try     man expect      on you linux box.

> > >> expect will let you script commands to an interactive session.
> > >> It will not navigate a web page unless you can use keyboard keys to
> > >> navigate the webpage.

> > > Does this include the "tab" key? Then it might work!

> > using pull down menuse might be kinda tough.

> Fortunately, it's simple page. No JavaScript and simple input fields only.
> But it consists of frames... I guess lynx is not able of handling frames, is
> it?

Lynx is perfectly capably of handling frames, at least all recent
versions are.

It just displays a screen saying "FRAME: <name>" etc., you select them
with the right arrow like any link.

Regards, Ian

 
 
 

1. replace dynamic ip address in html file with new address

First question is:

How can I insert my dynamic ip address from a file called 'add' that has only
my ip address in it into the line below where it says NOT.ON.LINE.NOW
How can I replace my

<p>My current IP address is &lt;<B><I>NOT.ON.LINE.NOW</B></I>&gt;</p>
<p>Last automatic update: <B><I><$DateTime></B></I></p>

Next question is:
Once I insert my ip address into the above line, how do I replace the address
with another address.

<p>My current IP address is &lt;<B><I>206.3.12.2</B></I>&gt;</p>

I need a replace type command such as: replace $1 with $2.

I found this in the sed man page but I don't know how to go about using it

[2addr]y/string1/string2/
             Replace all occurrences of characters in string1 in the pattern
             space with the corresponding characters from string2. Any charac-
             ter other than a backslash or newline can be used instead of a
             slash to delimit the strings.  Within string1 and string2, a
             backslash followed by any character other than a newline is that
             literal character, and a backslash followed by an ``n'' is re-
             placed by a newline character.

2. DVD recorder

3. How to determine a mac address on a remote computer with only ip address known?

4. Networking Linux with Windows

5. from known MAC address to find IP address

6. Upgrading motherboard processor, need to reinstall?

7. Changing IP address on Solaris 9 with multiple virtual IP addresses

8. A second display

9. WANTED: pingmac <IP ADDR> which returns <MAC ADDRESS of IP ADDRESS>

10. IP Masquerading with IP Address and Mac Address Restrictions

11. How do I know PPP dynamic IP address?

12. Static IP address from Dynamic IP

13. tcp/ip with dynamic ip addressing?