0

i need to join PCs with public and domestic firewall profiles activated. If i shutdown both firewalls profile in target Host the following command works fine.

Add-Computer -ComputerName $targetHost-DomainName domain.com -Credential $Global:credentialObject -LocalCredential $targetHost\localAdmin -Restart

But in the production scenario i need to open specific ports by using a domain policy. The idea of this script is to remove PC from domain and add it for other reasons

So, what ports do i need to open in $targetHost firewall?

Thanks

1 Answer 1

2

The firewall rules you need to configure in order to allow domain joining are the following:

  • Server LAN to Client LAN – Only allow Ping Traffics (ICMP Type 8, Code:255)
  • Client LAN to Server LAN – Only allow:
    • TCP : 88, 135, 139, 389, 445, 49152-65535 (High Ports)
    • UDP : 53, 123, 137, 138, 389, 123, 49152-65536 (High Ports)

This configuration has been reportedly tested on lab by Mr Yong Kam Wah, for full details see his blog post Firewall Ports Required to Join AD Domain

The full list of ports needed by Active Directory is detailed in this Microsoft document: Active Directory and Active Directory Domain Services Port Requirements

You must log in to answer this question.

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