allan

DHCPd: Integrating with Active Directory DNS using GSS-TSIG

Oct 20th, 2018
1,495
0
Never
11
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.30 KB | None | 0 0
  1. Retrieved from https://community.infoblox.com/t5/DNS-DHCP-IPAM/DDNS-to-Windows-server-Failed-TGT/m-p/8857/highlight/true#M1662
  2. Original from https://www.accumuli.com/blog/infoblox-and-gss-tsig
  3.  
  4.  
  5.  
  6. Infoblox and GSS-TSIG
  7. Wednesday 14th July 2010
  8.  
  9. I've been playing with GSS-TSIG support in Infoblox recently as we have a few customers who are looking to use it. Basically an Infoblox NIOS appliance can use GSS-TSIG authentication in one of two modes:
  10.  
  11. * GSS-TSIG from Clients to Infoblox DNS Servers
  12. * GSS-TSIG from Infoblox DHCP Servers to Microsoft DNS
  13.  
  14. My testing focused in the second option - running an Infoblox DHCP server and having it do DDNS to a MS DNS server, hosting secure AD-integrated zones. I did the following to get it working:
  15. Setup
  16.  
  17. * Windows server: artemis.foo.com (192.168.69.198)
  18. * Windows AD domain: foo.com
  19. * Infoblox DHCP grid member
  20.  
  21.  
  22. Windows stuff
  23.  
  24. * Configure the Windows server and the NIOS appliance to synchronize time with the same NTP server (GSS-TSIG seems to like the same time on both systems)
  25.  
  26. * Add an AD account, example:
  27. Username: bloxgss
  28. Password: Password1
  29. Enable 'Use DES encryption...' on the users account (if running Windows server 2003)
  30.  
  31. * Note: The AD domain I'm testing with is foo.com.
  32.  
  33. * Generate a 'keytab' file on the Windows server, examples:
  34. Windows 2003: C:\>ktpass -princ bloxgss/[email protected] -mapuser [email protected] -pass Password1 -out blox2k3.ktb -ptype krb5_nt_principal -crypto des-cbc-md5 +DesOnly
  35.  
  36. Windows 2008: C:\>ktpass -princ [email protected] -mapuser [email protected] -pass Password1 -out blox2k8.ktb -ptype krb5_nt_principal -crypto All +DesOnly
  37.  
  38. Notes:
  39. * A full description of the ktpass command line options is in the Infoblox NIOS admin guide. But the main difference is that Windows 2003 requires the principal name to include a slash with a character string (hence /instance). Windows 2008 doesn't require this.
  40.  
  41. * ktpass.exe - KtPass.exe command line tool configures the principal name for the service in Active Directory and generates an MIT-style Kerberos "keytab" file containing the shared secret key. The tool allows UNIX-based services that support Kerberos authentication to use the interoperability features provided by the Windows Server 2003 Kerberos KDC service.
  42.  
  43.  
  44. UPDATE - October 2010
  45. =====================
  46. No Des
  47. Due to Microsoft recommending that in Windows 2008, accounts should not be configured for Des only, I now omit the '+DesOnly' option on the ktpass command line when generating the keytab file.
  48.  
  49.  
  50. Windows 2008 R2
  51. If using Windows 2008 R2, the DDNS updates will fail if the keytab file is generated using the '-crypto All' option - Windows will not generate a Kerberos ticket for the Infoblox AD account. To resolve this, generate the keytab file with a specific encryption type, which is one of:
  52. * DES-CBC-MD5
  53. * AES256-SHA1
  54. * AES128-SHA1
  55. * RC4-HMAC-NT
  56.  
  57. I have tested with AE256-SHA1 and it worked fine.
  58.  
  59. An example of the ktpass command line is:
  60. C:\>ktpass -princ [email protected] -mapuser [email protected] -pass Password2 -out blox2k8r2.ktb -ptype krb5_nt_principal -crypto AES256-SHA1
  61.  
  62. NOTE: This process can also be used if you want to force a particular encryption type in Windows 2008.
  63.  
  64.  
  65. Infoblox stuff
  66.  
  67. * Enable DDNS in Infoblox, with GSS-TSIG authentication (grid or member level), example:
  68. Enable GSS-TSIG and define:
  69. FQDN/IP of the domain controller: artemis.foo.com
  70. Upload the keytab file generated in the previous step
  71.  
  72. Enable option81 support, if required
  73.  
  74. * Define external DDNS zones:
  75. Forward zone:
  76. zone: foo.com
  77. DNS Server Address: 192.168.69.198
  78. Security: GSS-TSIG
  79. AD Domain: FOO.COM
  80. DNS Principal: DNS/[email protected]
  81.  
  82. Reverse zone:
  83. zone: 69.168.192.in-addr.arpa
  84. DNS Server Address: 192.168.69.198
  85. Security: GSS-TSIG
  86. AD Domain: FOO.COM
  87. DNS Principal: DNS/[email protected]
  88.  
  89. * Restart services and then check the syslog. You should see a number of GSS-TSIG entries, but the one I was looking for was:
  90. dhcpd: Security context established with server 192.168.69.198 for principal bloxgss/[email protected]
  91.  
  92. * Then get a client to obtain an IP and confirm MS DNS is updated!
  93.  
  94. Notes:
  95. In the DNS principal field, it must start with 'DNS/' (i.e. you need to type this in!). This then creates the required statements in the dhcpd configuration file. Example:
  96. zone "foo.com." {
  97. primary 192.168.69.198;
  98. dns-principal "DNS/[email protected]";
  99. key GSS_TSIG_KEY_1;
  100. }
  101.  
  102. There are a few considerations when deploying GSS-TSIG updates on Infoblox:
  103. * An Infoblox DHCP server can send GSS-TSIG updates for one AD-integrated secure domain only *
  104.  
  105. * Multiple Infoblox DHCP servers can update that domain (using the same keytab on all servers or generating different keytab files for each server)
  106.  
  107. * Each grid DHCP member can update a different AD-integrated secure domain, if necessary
  108.  
  109. * A new keytab file must be generated and upload to Infoblox if the AD user's password that Infoblox uses is changed (I'm sure security teams would have an issue setting 'password never expires' on the account!)
  110.  
  111. * If a network view has multiple DNS views, you can select only one DNS view for DDNS updates
  112.  
  113. * The admin guide seemed to say that the Infoblox member must be in the AD domain it will be updating, or there must be a trust relationship. I didn't come across this though in testing
  114.  
  115. So, of these the first one seems to be the main issue with customers I've talked to - the Infoblox DHCP server can only send GSS-TSIG updates to one domain. One potential workaround if there are multiple AD domains in use is to have the clients (those that do DDNS updates themselves) update the A record and the DHCP server update the PTR, by using option 81. This only works though if the reverse zone(s) reside on one system.
  116.  
  117.  
  118. UPDATE March 2011
  119. =================
  120. Infoblox can update multiple AD domains securely, as long as AD trusts are in place. See the Infoblox DHCP GSS-TSIG updates to multiple AD zones article which details the configuration required to get this working.
  121.  
  122.  
  123. Kier Prior-Williams
  124. Professional Services Consultant
  125. tuscany networks Limited
  126. Tuscany House, White Hart Lane, Basingstoke, RG21 4AF, UK.
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment