Preserve DNS name lookup across CED and Sala Wi-Fi profiles
This commit is contained in:
1 parent
b9756ad3b2
commit
2cca02db35
2 files changed
+63
-3
No files matched your search
@@ -277,7 +277,11 @@ suffix `lci.lasalle.mx` and an NRPT rule for that namespace pointing to
|
|||||||
`192.168.54.211`; `scripts/Set-SguCedAdminDns.ps1` reproduces this local setup.
|
`192.168.54.211`; `scripts/Set-SguCedAdminDns.ps1` reproduces this local setup.
|
||||||
The prior suffix is saved in `LCI77-Sala-DNS-before.json` in the protected private
|
The prior suffix is saved in `LCI77-Sala-DNS-before.json` in the protected private
|
||||||
folder. The rule applies only to this DNS namespace; existing Tailscale rules
|
folder. The rule applies only to this DNS namespace; existing Tailscale rules
|
||||||
remain intact. The adapter suffix persists across Wi-Fi profile changes.
|
remain intact. A later SSID switch showed that Windows cleared the connection
|
||||||
|
suffix on Sala Inmersiva, so an adapter suffix alone was insufficient. The script
|
||||||
|
now sets a persistent global DNS search list with `lci.lasalle.mx` first and
|
||||||
|
preserves existing global and interface suffixes, including Tailscale's suffix.
|
||||||
|
The original global list is saved separately in `LCI77-DnsSearchList-before.json`.
|
||||||
|
|
||||||
Validation used Windows' application resolver (`System.Net.Dns.GetHostAddresses`),
|
Validation used Windows' application resolver (`System.Net.Dns.GetHostAddresses`),
|
||||||
not just an explicit DNS-server query. All six short names resolved on LCI-77
|
not just an explicit DNS-server query. All six short names resolved on LCI-77
|
||||||
@@ -289,7 +293,8 @@ endpoint across networks; it does not assert an authenticated desktop session.
|
|||||||
|
|
||||||
To undo this DNS repair, disable the sync task first. Remove only manifest-owned
|
To undo this DNS repair, disable the sync task first. Remove only manifest-owned
|
||||||
A records that still match their last published IP and have no AD computer object.
|
A records that still match their last published IP and have no AD computer object.
|
||||||
On LCI-77, restore the saved Wi-Fi suffix and remove only the NRPT rule with the
|
On LCI-77, restore the saved global search list and Wi-Fi suffix, and remove only
|
||||||
|
the NRPT rule with the
|
||||||
comment `CED domain DNS for local administrator Wi-Fi`. Keep the domain GPO and
|
comment `CED domain DNS for local administrator Wi-Fi`. Keep the domain GPO and
|
||||||
unrelated DNS rules. These DNS changes require no router apply or radio restart.
|
unrelated DNS rules. These DNS changes require no router apply or radio restart.
|
||||||
|
|
||||||
@@ -326,6 +331,46 @@ reconfigured: its WinRM ports were unavailable, so its user was asked to reconne
|
|||||||
Wi-Fi and verify the short name. Existing clients may keep their previous DHCP
|
Wi-Fi and verify the short name. Existing clients may keep their previous DHCP
|
||||||
DNS settings until reconnection or lease renewal.
|
DNS settings until reconnection or lease renewal.
|
||||||
|
|
||||||
|
#### Windows application resolution on workgroup clients
|
||||||
|
|
||||||
|
On October 1, LCI-77 resolved SI-04 again after returning to CED, but lost Windows
|
||||||
|
application resolution on Sala when its connection suffix disappeared. After the
|
||||||
|
persistent search-list repair, `System.Net.Dns.GetHostAddresses` resolved SI-04
|
||||||
|
and SGU-DC02 on both SSIDs. A TCP socket explicitly bound to LCI-77's Sala address
|
||||||
|
`192.168.55.201` connected by the short name `SGU-DC02` to `192.168.54.211:3389`
|
||||||
|
and received a 19-byte successful HYBRID/NLA negotiation response. This confirms
|
||||||
|
the RDP endpoint is reachable across VLANs; no authenticated desktop session
|
||||||
|
was tested. LCI-77 was returned to CED after validation.
|
||||||
|
|
||||||
|
A user screenshot from **SI-04** shows RDP error `0x104` before credentials:
|
||||||
|
the bare name SGU-DC02 is not found. A default `Resolve-DnsName` also reports
|
||||||
|
`ERROR_INVALID_NAME`, while `Resolve-DnsName -Type A -DnsOnly` returns the correct
|
||||||
|
server IP. DNS-server answers alone do not verify the Windows application
|
||||||
|
resolver. The user applied this elevated client repair on SI-04 and returned
|
||||||
|
successful application-resolution and RDP TCP checks:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
$s = @('lci.lasalle.mx') + @((Get-DnsClientGlobalSetting).SuffixSearchList) + @(Get-DnsClient | Select-Object -ExpandProperty ConnectionSpecificSuffix)
|
||||||
|
Set-DnsClientGlobalSetting -SuffixSearchList @($s | Where-Object { $_ } | Select-Object -Unique)
|
||||||
|
Clear-DnsClientCache
|
||||||
|
[System.Net.Dns]::GetHostAddresses('SGU-DC02')
|
||||||
|
Test-NetConnection SGU-DC02 -Port 3389
|
||||||
|
```
|
||||||
|
|
||||||
|
SI-04's application resolver returned `192.168.54.211`. `Test-NetConnection`
|
||||||
|
returned `TcpTestSucceeded: True` using Wi-Fi 2, source `192.168.55.138`, target
|
||||||
|
`SGU-DC02`, and port 3389. This confirms the client DNS repair and connectivity;
|
||||||
|
an authenticated desktop session has not been confirmed. The suffix change is
|
||||||
|
persistent and does not require adding SI-04 to the domain. The same repair has
|
||||||
|
not yet been applied to SI-03.
|
||||||
|
|
||||||
|
This configures DNS lookup without domain enrollment. For an immediate test,
|
||||||
|
use `SGU-DC02.lci.lasalle.mx` in Remote Desktop. SI-03's WinRM ports and DCOM
|
||||||
|
management were unavailable; an authenticated session from that PC remains
|
||||||
|
unverified. On SGU-DC02, RDP is enabled, TermService is running, TCP 3389 listens,
|
||||||
|
and the existing RDP firewall rule already allows access. No additional firewall
|
||||||
|
opening or NLA change was needed.
|
||||||
|
|
||||||
Internal DNS now depends on SGU-DC02 in Sala as it already does in CED. Personal
|
Internal DNS now depends on SGU-DC02 in Sala as it already does in CED. Personal
|
||||||
Wi-Fi authentication still does not require RADIUS or domain membership. To roll
|
Wi-Fi authentication still does not require RADIUS or domain membership. To roll
|
||||||
back this follow-up, restore Sala's DNS selection to **Default**, disable the
|
back this follow-up, restore Sala's DNS selection to **Default**, disable the
|
||||||
@@ -352,5 +397,6 @@ is not changed by this network repair.
|
|||||||
- [Computer startup script protocol](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpscr/ff1fd13e-1e18-4160-9b50-0263e108e5e1)
|
- [Computer startup script protocol](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-gpscr/ff1fd13e-1e18-4160-9b50-0263e108e5e1)
|
||||||
- [Configuration Manager client source selection](https://learn.microsoft.com/en-us/intune/configmgr/core/servers/deploy/configure/boundary-groups-distribution-points)
|
- [Configuration Manager client source selection](https://learn.microsoft.com/en-us/intune/configmgr/core/servers/deploy/configure/boundary-groups-distribution-points)
|
||||||
- [Domain DNS policy cmdlet](https://learn.microsoft.com/en-us/powershell/module/dnsclient/add-dnsclientnrptrule)
|
- [Domain DNS policy cmdlet](https://learn.microsoft.com/en-us/powershell/module/dnsclient/add-dnsclientnrptrule)
|
||||||
|
- [Windows DNS suffix search and application resolution](https://learn.microsoft.com/en-us/windows-server/networking/dns/queries-lookups)
|
||||||
- [Configuration Manager client monitoring](https://learn.microsoft.com/en-us/intune/configmgr/core/clients/manage/monitor-clients)
|
- [Configuration Manager client monitoring](https://learn.microsoft.com/en-us/intune/configmgr/core/clients/manage/monitor-clients)
|
||||||
- [Configuration Manager connection ports](https://learn.microsoft.com/en-us/intune/configmgr/core/plan-design/hierarchy/ports)
|
- [Configuration Manager connection ports](https://learn.microsoft.com/en-us/intune/configmgr/core/plan-design/hierarchy/ports)
|
||||||
@@ -12,11 +12,23 @@ if (-not (Test-Path -LiteralPath $BackupPath)) {
|
|||||||
$client | Select-Object InterfaceAlias, ConnectionSpecificSuffix |
|
$client | Select-Object InterfaceAlias, ConnectionSpecificSuffix |
|
||||||
ConvertTo-Json | Set-Content -LiteralPath $BackupPath -Encoding UTF8
|
ConvertTo-Json | Set-Content -LiteralPath $BackupPath -Encoding UTF8
|
||||||
}
|
}
|
||||||
Set-DnsClient -InterfaceAlias $InterfaceAlias -ConnectionSpecificSuffix 'lci.lasalle.mx'
|
|
||||||
$rules = @(Get-DnsClientNrptRule | Where-Object { $_.Namespace -contains '.lci.lasalle.mx' })
|
$rules = @(Get-DnsClientNrptRule | Where-Object { $_.Namespace -contains '.lci.lasalle.mx' })
|
||||||
if ($rules.Count -gt 0 -and ($rules.Count -ne 1 -or $rules[0].NameServers -ne '192.168.54.211')) {
|
if ($rules.Count -gt 0 -and ($rules.Count -ne 1 -or $rules[0].NameServers -ne '192.168.54.211')) {
|
||||||
throw 'An existing domain DNS rule needs review; it was not overwritten.'
|
throw 'An existing domain DNS rule needs review; it was not overwritten.'
|
||||||
}
|
}
|
||||||
|
$globalBefore = Get-DnsClientGlobalSetting
|
||||||
|
$globalBackupPath = Join-Path (Split-Path $BackupPath) 'LCI77-DnsSearchList-before.json'
|
||||||
|
if (-not (Test-Path -LiteralPath $globalBackupPath)) {
|
||||||
|
$globalBefore | Select-Object SuffixSearchList | ConvertTo-Json |
|
||||||
|
Set-Content -LiteralPath $globalBackupPath -Encoding UTF8
|
||||||
|
}
|
||||||
|
# DHCP connection suffixes can disappear when changing SSIDs. The explicit
|
||||||
|
# search list is persistent and also preserves existing VPN/interface suffixes.
|
||||||
|
$suffixes = @('lci.lasalle.mx') + @($globalBefore.SuffixSearchList) +
|
||||||
|
@(Get-DnsClient | Select-Object -ExpandProperty ConnectionSpecificSuffix)
|
||||||
|
$suffixes = @($suffixes | Where-Object { $_ } | Select-Object -Unique)
|
||||||
|
Set-DnsClientGlobalSetting -SuffixSearchList $suffixes
|
||||||
|
Set-DnsClient -InterfaceAlias $InterfaceAlias -ConnectionSpecificSuffix 'lci.lasalle.mx'
|
||||||
if ($rules.Count -eq 0) {
|
if ($rules.Count -eq 0) {
|
||||||
Add-DnsClientNrptRule -Namespace '.lci.lasalle.mx' -NameServers '192.168.54.211' -Comment 'CED domain DNS for local administrator Wi-Fi'
|
Add-DnsClientNrptRule -Namespace '.lci.lasalle.mx' -NameServers '192.168.54.211' -Comment 'CED domain DNS for local administrator Wi-Fi'
|
||||||
}
|
}
|
||||||
@@ -24,5 +36,7 @@ Clear-DnsClientCache
|
|||||||
[pscustomobject]@{
|
[pscustomobject]@{
|
||||||
Computer = $env:COMPUTERNAME
|
Computer = $env:COMPUTERNAME
|
||||||
Suffix = (Get-DnsClient -InterfaceAlias $InterfaceAlias).ConnectionSpecificSuffix
|
Suffix = (Get-DnsClient -InterfaceAlias $InterfaceAlias).ConnectionSpecificSuffix
|
||||||
|
SearchList = (Get-DnsClientGlobalSetting).SuffixSearchList
|
||||||
SI04 = @([Net.Dns]::GetHostAddresses('SI-04') | ForEach-Object IPAddressToString)
|
SI04 = @([Net.Dns]::GetHostAddresses('SI-04') | ForEach-Object IPAddressToString)
|
||||||
|
SGUDC02 = @([Net.Dns]::GetHostAddresses('SGU-DC02') | ForEach-Object IPAddressToString)
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user