Re: passing dns IP from dhcp client on external IF to dhcp server on internal IF

From: erik (erik_at_geenspam.vanwesten.net)
Date: 10/08/03


Date: Wed, 08 Oct 2003 00:02:04 +0200

Ben Mord wrote:

>
> "Ben Mord" <benmord@earthlink.net> wrote in message
> news:blsdqm$fp1gq$1@ID-101018.news.uni-berlin.de...
>> Hello,
>>
>> This must be a very common situation, but I can't seem to find the
>> answer.
>>
>> Suppose you have a firewall box running OpenBSD with two nics. I'll
>> call them if1 and if2. if1 is external, if2 is the internal LAN.
>>
>> if1 gets IP and DNS settings through DHCP, so I have a dhcp client on
>> if1. My task is to make the current DNS settings available to
>> computers on the internal lan. I can run a DHCP server on if2, but
>> the config files seem to expect me to hard code the DNS IP addresses.
>> How do I tell the dhcp server on if2 to get the DNS IP info from the
>> dhcp client on if1?
>>
>> Or is there a better way? Running BIND seems like overkill, and even
>> if I went this direction I'd still have the dilemma of how to get the
>> current external DNS settings to BIND.
>>
>> Thanks,
>> Ben
>
> Judging from the lack of responses, I'll hazard a guess that there is
> no standard solution to this problem. In practice, its not much of a
> problem anyhow - how often are the DNS server IPs really going to
> change? (If there isn't yet a standard solution, I would guess this is
> why.) It just doesn't feel very satisfying to statically code this
> stuff, because to do this is to knowingly create a future problem that
> at some point will cause breakage, and which someone will then have to
> debug and fix.
>
> The solution I would propose is a hook in the DHCP client that allows
> you to execute a custom script anytime the client receives new
> settings. The OS could ship with a sample script that propogates DNS
> settings to a DHCP server's config files, and then restarts the DHCP
> server. Users could modify this script if there were some other custom
> DHCP settings that also needed to be propogated. By using a script,
> the solution could come ready to work out of the box, and yet also be
> flexible enough to handle a range of similar requirements.
>
> Ben

There is a solution, it is much simpler than you would expect. Hardcode
the dns from your ISP in dhcp. They won't change that often, they
_should_ not change that often. If they do, change ISP. I bet that 99%
of the people who do not run DNS do this.

EJ

-- 
Remove the obvious part (including the dot) for my email address.
http://www.vanwesten.net for examples of ipf and pf.


Relevant Pages

  • Re: Change computer dns to automatic
    ... you can use the script below to change all IP-settings to DHCP on the ... Dim wmiRoot, wmiQuery ... I am using DHCP for my ... >I am looking for a way to change all the dns configuration on all the XP ...
    (microsoft.public.windows.server.scripting)
  • Re: remote ip configuration
    ... > I'm trying to write a script that would allow me to completely control Local ... > configuration on the target workstation (it can be seen from its Local Area ... I use this to set DHCP and obtain DNS servers. ...
    (microsoft.public.scripting.wsh)
  • DNS information from DHCP, you are sick
    ... Obtain DNS information from DHCP ... that I would like to be able to make the change via script. ... the wsh script works to change the client over to DHCP. ...
    (microsoft.public.scripting.wsh)
  • Re: Change IP related values due to WAN design change
    ... Properly set up WINS and DNS will take care of their own cleanup nicely. ... The switch to DNS is a much simpler and safer script and it accomplishes ... After DHCP is implemented then ... Just think of the added flexibility of the network when you have ...
    (microsoft.public.windows.server.scripting)
  • Re: remote ip configuration
    ... DHCP, it just sat there with DNS servers list empty... ... missed something critical in my script or there's no possibility at all to ... make a workstation use DNS settings provided by DHCP. ... test machine got reinstalled and now everything seems Ok.. ...
    (microsoft.public.scripting.wsh)