1

We have a database server and web-dashboard currently accessed using the IP address that we need to access with a DNS name.

I don't have administrative access to the infrastructure. We're international, and most servers are accessed with Remote Desktop. We have a DNS server, but I don't have permissions to access it remotely.

Everywhere I looked assumes administrative control over the DNS server, or they'll tell you to setup your own DNS. I'm going to have to use one of the existing ones.

Is there a way to send a request from my PC to the DNS to register a new domain name to an IP address?

I feel like there must be, because device names are registered automatically as host names in the local DNS.

I can contact the administrative team, but they are difficult to work with.

8
  • 2
    "Is there a way?" If course there is. But what you are asking is can non-admin users create zones, and the answer is no. The command is Add-DNSServerPrimaryZone. learn.microsoft.com/en-us/powershell/module/dnsserver/…
    – Greg Askew
    Commented Jul 9 at 8:46
  • 1
    What operating system are you using?
    – David
    Commented Jul 9 at 8:53
  • 1
    because device names are registered automatically as host names in the local DNS sounds like you're talking about some DNS server that is at the same time a DHCP server. Or maybe you're talking about LLMNR or alike.
    – Tom Yan
    Commented Jul 9 at 23:46
  • But what you really need is unclear. Sometimes you sounded like you need to "request" a domain name for a server. Sometimes you sounded like you just need a local record on a client (so that you don't need to type the IP address every time).
    – Tom Yan
    Commented Jul 9 at 23:52
  • 1
    >> "I can contact the administrative team, but they are difficult to work with." Your best course of action really is to do it through your IT/Admin function. Get your line management involved and their sign-off as this is work they want done. Write out clearly and exactly what you want done. Your IT team might feel like they are difficult to work with, but they would rather have you request DNS changes go through them than you doing "shadow" IT that they will have to unpick in the future when something breaks what you have done.
    – David
    Commented Jul 10 at 11:21

2 Answers 2

3

You can use the hosts file on each workstation that you want to reference to the database server. You need to update each workstation individually, and if the IP address changes, then you need to update each workstation again.

Using the hosts files is fraught with all sorts of problems and does not scale very well at all. So if this a solution that is going to be used by many people, get in touch with your DNS administrators, and have them amend your DNS instead. You will need administrative access to each workstation in order to change the contents of the hosts file.

Also, you have not indicated whether this DNS server sits internally on your network, or externally. If it is external, you could register your new own domain name, and define the server as a host on your new domain name.

On Windows, the hosts file is located:

`c:\windows\system32\drivers\etc\hosts`

On Linux, the hosts file is located:

`/etc/hosts`

On MacOSX, the hosts file is located:

`/private/etc/hosts`
2
  • i'm pretty sure you need to be an admin to edit /etc/hosts
    – Jasen
    Commented Jul 10 at 12:36
  • @jasen, yes, you need to local admin rights, as I indicated in my answer.
    – David
    Commented Jul 11 at 8:54
3

device names are also registered automatically as host names in the local DNS.

  • If you are talking about an Active Directory domain (where domain member PCs register themselves in DNS), this works via RFC 2136 dynamic updates that could be performed using the nsupdate tool from BIND. The default is to require Kerberos authentication – the GSS-TSIG option in nsupdate – and (as far as I know) will allow any valid user to register any host name by default.

    $ kinit [email protected]
    $ nsupdate <<-!
      gsstsig
      zone ad.example.com
      del test.ad.example.com 0 IN ANY
      add test.ad.example.com 3600 IN A 192.0.1.7
      add test.ad.example.com 3600 IN AAAA 2001:db8:1::7
      add test.ad.example.com 3600 IN TXT "Huntbook's webapp"
      send
    !
    

    (…I kind of suspect that the "admin" API used by the Active Directory DNS control panel (RSAT) follows the same security configuration, and would let you create new DNS entries from a GUI, but at the moment I can't verify that. You can install the RSAT GUI tools on Windows via "Add Feature" and have a try.)

  • On the other hand, if you are talking about a smaller office setup where any random device registers itself in the router's ".lan" or ".home"-style DNS domain, this actually works via DHCP – devices don't register themselves as such; they only provide their hostname as part of obtaining an IP address lease, and so the router only registers those hostnames that correspond to physical devices.

    In those networks, registering a second name is doable using e.g. a Linux macvlan to acquire a second DHCP lease for the machine, but honestly that's far too much into the weeds – consider that someone will need to understand and admin this setup after you.

2
  • Great answer, but won't the user need to have "DNS Admin" or higher privileges? Think hosts/computer accounts register themselves via the DHCP service. And AD DNS config is usually replicated via AD LDAP between DC's.
    – David
    Commented Jul 10 at 11:16
  • 1
    @David: "Think hosts/computer accounts register themselves via the DHCP service" – no they don't. It's probably an option if you run a "pure MS" network (i.e. MS DHCP and MS DNS), but it's very much a secondary option. The primary mechanism has always been RFC2136 dynamic updates, which leads to each AD-hosted zone having "Authenticated Users: Create Objects" in its zone-level ACL so that computer accounts could create entries for themselves. The defaults may have changed since the last time I investigated this, but in my tests with slightly-outdated AD, users could create entries too. Commented Jul 10 at 11:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .