Re: How to get the public IP of my GW

phn_at_icke-reklam.ipsec.nu
Date: 07/20/04


Date: Tue, 20 Jul 2004 09:54:45 +0000 (UTC)

Keve Nagy <no_spam@poliod.hu> wrote:
> This might be a tricky IP networking question, perhaps it is not even
> the best newsgroup to ask, but I trust some of you has done something
> similar before and will be able to give me some ideas.

> It might be a bit long, but quickly readable and understandable, so
> please read on and skip the paragraphs which are obvious, they are only
> there to make things clearly understandable.

> Imagine the following network layout:

> 1., an ADSL connection to/from ISP
> 2., connected to a DSL modem/router device (a little grey box)
> 3., which then connects to a Broadband router/switch
> 4., where the LAN computers are connected to.

> I have this connection with a friend next door. He is the subscriber,
> and we share the monthly subscription fee, as well as the connection
> because one of those UTP cables from the switch (#3) comes over to my flat.

> 1->2; The DSL modem (#2), which is also a router/firewall receives its
> public IP via DHCP, and although it is configured to always-on
> connection, we all know that sometimes its IP address gets changed.

> 2->3; Behind this unit (#2), the internal network (as I call, level-1
> internal) uses the private IP range of 10.0.0.x, as this is what the
> router supports. The second device on route, the broadband-router/switch
> (#3) has a fixed IP of 10.0.0.1 and for the switch RJ45 ports it
> provides DHCP services for the LAN computers in the private range of
> 192.168.1.x.

> 3->4; My mashine has a fixed IP in this latter range, and it runs
> FreeBSD 4.9R. My friend next door also has his computer connected to the
> switch.

> The connection works, I can use the internet with my BSD mashine, my
> friend can use the internet with his Windows laptop, so we are all OK
> with the basics. I know that this may not be the ideal connection
> solution, don't even ask me why we have it this way, it is how my friend
> built it.

> My problem comes with incoming connections!
> As the public IP the ISP provides via DHCP is used by our first grey box
> in the way (the DSL modem, #2) I cannot directly connect to my BSD
> mashine form outside. My friend was/is happy to set up any port
> forwardings on those two routers/firewalls (#2 and #3) so if I try to
> connect to a certain port addressing the public IP of the DSL modem (#2)
> I will be routed to the second router/firewall (#3) and from there I
> will bounce to my BSD mashine.
> This all works (or I must say should work, as I have not tried this yet,
> maybe today if we both have time to do the settings) as long as that
> public IP does not change. But when it changes, I need to get home, find
> my friend home as well and ask him to tell me the new/current IP the DSL
> modem uses.

> I would like to set up a dyndns name and I know that there are different
> FreeBSD solutions to dynamically update the IP for that name entry when
> it changes, but of course that assumes that the IP in question is the
> FreeBSD mashine's own IP. In my case, my mashines IP stays the same all
> the time, and what I need to update is the external IP of the DSL modem.

> Question 1: How can I get the public IP of the DSL modem from my FreeBSD
> mashine? I mean, even traceroute shows the Modem with its 10.0.0.x
> address and not its external IP.

> Question 2: Do you think it is possible to get my FreeBSD to update that
> dyndns entry every time when the modem's public IP changes?

> Every suggestion or idea is welcome! I also appreciate any URL to pages
> that explains similar solutions!

I made a small application-pair for this purpose :
ftp://n.manet.nu/pub/dynupdate.tar

It sends one udp-packet to a receiver, the packet contents identifies
the sender, the ip-address is used to grab the "outer address". As i used
it it runs a script that uodates a local dns server.

> Thanks,

> Keve

> --
> If you need to reply directly:
> keve(at)mail(dot)poliod(dot)hu

-- 
Peter Håkanson         
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out,
	   remove "icke-reklam" if you feel for mailing me. Thanx.


Relevant Pages

  • How to get the public IP of my GW
    ... I have this connection with a friend next door. ... The connection works, I can use the internet with my BSD mashine, my ... in the way (the DSL modem, #2) I cannot directly connect to my BSD ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Is this an easy fix or complicated one?
    ... In memory of our dear friend, ... >> power outage, it might damage your system beyond repair. ... >> connection active, perhaps sending out information beyond what is normal, ... >> Michael Solomon MS-MVP ...
    (microsoft.public.windowsxp.help_and_support)
  • Re: Getting an IP Address
    ... it appears you have both a "network card" ... A normal home network connection with a router goes like this: ... Wall Jack to DSL Modem (normal phone wire connection without the DSL ... DSL Modem to Router ...
    (microsoft.public.windowsxp.network_web)
  • Re: ethernet connection wont work
    ... the Westell "DSL modem" (which actually includes a router) is configured. ... The Westell has a single Ethernet connector but the Linksys probably has ... Area Connection." ...
    (microsoft.public.windowsxp.network_web)
  • Re: Trouble obtaining IP address
    ... My DSL modem is a Westell WireSpeed device. ... When the connection could not be established the default Gateway did not ... I have an old computer connected to internet via DSL modem which used to ... ipconfig deal with Verizon tech support, but could not make it work. ...
    (microsoft.public.windowsxp.network_web)