Hosting own DNS on static environment

ckshane
New Contributor

I am setting here in a Casper Training and I have a situation that I need some help. I was wondering if there is a policy set or a script to set a DNS on a static based environment. I work at a school that hosts it's own DNS and has no DHCP set up. Any ideas would be helpful.

4 REPLIES 4

kuwaharg
New Contributor III

You can probably create a shell script that leverages the networksetup command using the setdnsservers flag.

networksetup -setdnsservers networkservice dns1 [dns2] [...]

-setdnsservers networkservice dns1 [dns2] [...]
  Use this command to specify the IP addresses of servers you want the specified
  <networkservice> to use to resolve domain names. You can list any number of 
  servers (replace dns1, dns2, and so on with the IP addresses of domain name 
  servers). If you want to clear all DNS entries for the specified network 
  service, type "empty" in place of the DNS server names.

ckshane
New Contributor

You guys rock and Dusty from Minneapolis says "Hi"

jarednichols
Honored Contributor

kuwahrg's solution is good.

Now, hop in the DeLorean and come up to 2013.

ckshane
New Contributor

I like it back here in 1995. But I will talk with Doc Brown.