check this https://theitbros.com/join-domain-and-login-over-a-vpn-connection/
Join Machine to traditional AD on Azure VM thru Azure P2S
Hi all
I have a domain controller running on Azure VM and Azure P2S VPN. In case I want to join a local machine connected to azure p2s to the domain getting an error saying Domain Controler does not exist. I have ping to DC but NsLookup cant resolve Domain.
Questions
- Is there any way to join the machine without changing the Adapter DNS setting or moderating the Hosts file?
- IS the good solution that uses Azure Ad connect and makes a hybrid domain controller?
- Any other Ideas?
Windows for business | Windows Client for IT Pros | Directory services | Active Directory
2 answers
Sort by: Most helpful
-
Luke Murray 11,521 Reputation points MVP2023-03-31T18:36:42.1133333+00:00 Hi, Abo
The issue is with DNS resolution - you would have to change your 'azurevpnconfig.xml' to have a DNS block, with the IP of your domain controller.
You may run into issues, as the P2S VPN doesn't connect automatically - and before the user is logged in, so although you could join the domain, you won't be able to log in as a user - you would need to connect with your local user, then connect to the P2S VPN, then do a switch user, and try to login with a domain user, while the P2S VPN is connected on the other user - to cache the domain user profile to your machine. If you want to do this - you may be better off with a Site to site VPN.
If you have a hybrid setup - you can login to a AAD machine, and access AD services - as long as you have line of sight to a domain controller.
ie
<clientconfig> <dnsservers> <dnsserver>10.0.18.4</dnsserver> </dnsservers> </clientconfig>