How to get the public IP of my GW
From: Keve Nagy (no_spam_at_poliod.hu)
Date: 07/20/04
- Next message: Henk Bokhoven: "Weird changes in (mod_)php4 version 4.3.8_1"
- Previous message: jpd: "Re: User Who Can Create, But Not Delete"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: How to get the public IP of my GW"
- Reply: phn_at_icke-reklam.ipsec.nu: "Re: How to get the public IP of my GW"
- Reply: Thomas Wolf: "Re: How to get the public IP of my GW"
- Reply: Torfinn Ingolfsen: "Re: How to get the public IP of my GW"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jul 2004 10:43:36 +0100
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!
Thanks,
Keve
-- If you need to reply directly: keve(at)mail(dot)poliod(dot)hu
- Next message: Henk Bokhoven: "Weird changes in (mod_)php4 version 4.3.8_1"
- Previous message: jpd: "Re: User Who Can Create, But Not Delete"
- Next in thread: phn_at_icke-reklam.ipsec.nu: "Re: How to get the public IP of my GW"
- Reply: phn_at_icke-reklam.ipsec.nu: "Re: How to get the public IP of my GW"
- Reply: Thomas Wolf: "Re: How to get the public IP of my GW"
- Reply: Torfinn Ingolfsen: "Re: How to get the public IP of my GW"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|