Turning a dynaimic IP address into a virtually static IP

Turning a dynaimic IP address into a virtually static IP

Post by Matthew Driv » Sun, 16 Jun 1996 04:00:00



Anyone made a dynamic IP address appear to be static?

I think I've got away to do it.

I've got a linux system at work acting as a gateway for the office. It
has a domain name and is a DNS.

At home I dial into the Internet using a dial-up account with another
provider. This account has a dynamic IP address.

I was thinking what if the current IP address for the home PC was put
onto the DNS file at work - it could then be accessed via the name.
homepc.workdomain.com.au

I've tried this by adding the line
homepc          IN      A       123.4.5.678
where the IP address is the current dynamic address.
Now while I stay logged on anyone can access me with
homepc.workdomain.com.au

Now what I need to workout is how to have my work linux computer
update the DNS file automatically.

My dial-up provider can be fingered to get my address so theoretically
my work machine should be able to find my IP. The finger looks like:
[xxx.isp.com.au]
Port What User             Location          When         Idle
Address
 1   PPP  username            ---               7:50am        :16
123.4.5.435
etc....

So with a grep on the user name the IP address could be found.

Then it just needs to recreate the DNS file with the updated info.
This could a run in a loop, say every 5 minutes.

Anyone done this before???? Any thoughts on it's viablilty?
---
===========================================================
Matthew Driver            

===========================================================

 
 
 

Turning a dynaimic IP address into a virtually static IP

Post by Roger Harke » Sun, 16 Jun 1996 04:00:00


: I was thinking what if the current IP address for the home PC was put
: onto the DNS file at work - it could then be accessed via the name.
: homepc.workdomain.com.au
:
: I've tried this by adding the line
: homepc          IN      A       123.4.5.678
: where the IP address is the current dynamic address.
: Now while I stay logged on anyone can access me with
: homepc.workdomain.com.au
:
[snip]
:
: Then it just needs to recreate the DNS file with the updated info.
: This could a run in a loop, say every 5 minutes.
:
: Anyone done this before???? Any thoughts on it's viablilty?
: ---

Most DNS lookups get cached for reuse on a later lookup.  Unless you
set the timeout value on this record to a realy short value to prevent
it's data from being cached you will run into probles.  For example
if I do a lookup on this name today, I'll get an answer thats correct
(probably), but if i make another lookup tomorow I'll probably get the
same answer as i got today.  This is because the nameserver i refer to
will see the request to the same address and supply an answer from its
cache instead of refering to your nameserver again.  The time-out value
on the data can be as long as a week.  These time-outs are set by the
originator of the data (thats you in this example).  They can be set
site wide (one value for all your records -typical) or they can be set
per record.

Personaly I don't think changing DNS data this frequently is a good idea.

 
 
 

Turning a dynaimic IP address into a virtually static IP

Post by Erik G. Burro » Mon, 17 Jun 1996 04:00:00



>Now what I need to workout is how to have my work linux computer
>update the DNS file automatically.
>My dial-up provider can be fingered to get my address so theoretically
>my work machine should be able to find my IP. The finger looks like:
>[xxx.isp.com.au]
>Port What User             Location          When         Idle
>Address
> 1   PPP  username            ---               7:50am        :16
>123.4.5.435
>etc....
>So with a grep on the user name the IP address could be found.
>Then it just needs to recreate the DNS file with the updated info.
>This could a run in a loop, say every 5 minutes.
>Anyone done this before???? Any thoughts on it's viablilty?

        I have not done this specific thing before, but I have done something
similar. When my Linux box dials into my ISP, a dynamic IP is
assigned, and pppd calls to a script file called /etc/ip-up with the
IP address in the command line parameters. I added some lines in that
script to automaticly add this IP to my /etc/hosts file. \
        Perhaps, you can write a script to grep out that IP, and write it to a
file. Then you could use grep (?) to find the entry in which your
system is named, and insert the new IP. I don't know if grep could be
used this way, but it seems logical to me. Let me know if it works
out.

                                                                                        -Erik G. Burrows
-Erik G. Burrows

"The purpose of Real Mode is to set up the processor for
Protected Mode operation."  -Intel

"IPs, IPCs, IDTs, GDTs, PIDs, SIDs and CTS."  -Me

 
 
 

Turning a dynaimic IP address into a virtually static IP

Post by Laurentiu Bade » Mon, 17 Jun 1996 04:00:00



> I've got a linux system at work acting as a gateway for the office. It
> has a domain name and is a DNS.

> At home I dial into the Internet using a dial-up account with another
> provider. This account has a dynamic IP address.

> I was thinking what if the current IP address for the home PC was put
> onto the DNS file at work - it could then be accessed via the name.
> homepc.workdomain.com.au

Depending on the order in which your server accesses hosts databases (/etc/hosts,
dns,yp), it'd be more convenient to put the ip/host mapping in /etc/hosts.

Quote:

> I've tried this by adding the line
> homepc          IN      A       123.4.5.678

Perhaps you should also add a PTR record in the 5.4.123.in-addr.arpa domain.
And most of all, you *have* to inc the serial number in the SOA record,
then do a named.reload or kill -HUP `cat /etc/named.pid` or something like that.

Quote:> where the IP address is the current dynamic address.
> Now while I stay logged on anyone can access me with
> homepc.workdomain.com.au

> Now what I need to workout is how to have my work linux computer
> update the DNS file automatically.

Same as above (named.reload). But why do you have named started on
your linux box ? can't you just use /etc/hosts and /etc/resolv.conf for the
times you're connected to the server ? named takes up some resources.

Quote:

> Anyone done this before???? Any thoughts on it's viablilty?

This shouldn't be done. It still won't work on other machines on the
internet since they cannot be forced to reload databases if they already have
cached a copy (except after the TTL).
And be careful when sending mail from your linux box (use either masquerading or
a static MX record in DNS, with mail exchanger set to your server).

Hope this helps,
Laurentiu

--
------------------------------------------------------------------------------


| Network Administrator                                                      |
| for node lmn.pub.ro.         http://www.lmn.pub.ro/~bytemare/              |
------------------------------------------------------------------------------

 
 
 

1. DHCP ip address vs static ip

I am trying to connect from work to home with ssh,but at home i have
network configured to obtain ip with DHCP,so ssh hangs up when i connect
to my static ip ... When trying to connect to dynamic assigned ip
everything works fine.
The problem is when i'm trying configure network to work with static ip,
i have something like
"foo.com-bad name" after telnet or ssh to it and when trying to add
default gateway-"SIOCADDRT:network is unreachable"...
Any help very much appreciated.

2. where is faq?

3. Static IP address from Dynamic IP

4. Mandrake 8.0 and cable modem

5. NAT and STatic IP addressing with ip

6. what is mbuf.h?

7. IP over IP to make static IP?

8. Installation Freezes...

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

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

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

12. IP Masquerading with IP Address and Mac Address Restrictions

13. IP Masquerading, NO Static IP, and Windows 95 ???