Orange-Cyberdefense / GOAD

game of active directory
GNU General Public License v3.0
5.12k stars 715 forks source link

disable the registration of the Ethernet interface error #147

Closed 0xDigimon closed 6 months ago

0xDigimon commented 10 months ago

i faced this error, and i don't know how i fixed it

TASK [domain_controller : disable the registration of the Ethernet interface (NAT address) in DNS] ********************************************************
fatal: [dc03]: FAILED! => {"changed": true, "cmd": "Get-NetAdapter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False", "delta": "0:00:01.782165", "end": "2023-11-20 21:08:23.000249", "msg": "non-zero return code", "rc": 1, "start": "2023-11-20 21:08:21.218083", "stderr": "Set-DNSClient : No MSFT_DNSClient objects found with property 'InterfaceIndex' equal to '3'.  Verify the value of the \r\nproperty and retry.\r\nAt line:1 char:91\r\n+ ... apter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False\r\n+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ObjectNotFound: (3:UInt32) [Set-DnsClient], CimJobException\r\n    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceIndex,Set-DnsClient", "stderr_lines": ["Set-DNSClient : No MSFT_DNSClient objects found with property 'InterfaceIndex' equal to '3'.  Verify the value of the ", "property and retry.", "At line:1 char:91", "+ ... apter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False", "+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "    + CategoryInfo          : ObjectNotFound: (3:UInt32) [Set-DnsClient], CimJobException", "    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceIndex,Set-DnsClient"], "stdout": "", "stdout_lines": []}
fatal: [dc01]: FAILED! => {"changed": true, "cmd": "Get-NetAdapter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False", "delta": "0:00:02.891711", "end": "2023-11-20 21:08:25.436696", "msg": "non-zero return code", "rc": 1, "start": "2023-11-20 21:08:22.544985", "stderr": "Set-DNSClient : No MSFT_DNSClient objects found with property 'InterfaceIndex' equal to '7'.  Verify the value of the \r\nproperty and retry.\r\nAt line:1 char:91\r\n+ ... apter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False\r\n+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n    + CategoryInfo          : ObjectNotFound: (7:UInt32) [Set-DnsClient], CimJobException\r\n    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceIndex,Set-DnsClient", "stderr_lines": ["Set-DNSClient : No MSFT_DNSClient objects found with property 'InterfaceIndex' equal to '7'.  Verify the value of the ", "property and retry.", "At line:1 char:91", "+ ... apter Ethernet | Set-DNSClient -RegisterThisConnectionsAddress $False", "+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~", "    + CategoryInfo          : ObjectNotFound: (7:UInt32) [Set-DnsClient], CimJobException", "    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceIndex,Set-DnsClient"], "stdout": "", "stdout_lines": []}

PLAY RECAP ************************************************************************************************************************************************
dc01                       : ok=20   changed=4    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0   
dc02                       : ok=19   changed=4    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0   
dc03                       : ok=20   changed=4    unreachable=0    failed=1    skipped=4    rescued=0    ignored=0   
srv02                      : ok=18   changed=3    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0   
srv03                      : ok=19   changed=4    unreachable=0    failed=0    skipped=4    rescued=0    ignored=0

any help please

Mayfly277 commented 10 months ago

oO what is this x) does a retry change anything ?

Al0neme commented 8 months ago

oO what is this x) does a retry change anything ?

I get the same error also after retry, and Is there any other help?

daviosardinha commented 7 months ago

This issue can be fixed doing the following: 1 - Login to the server, open Powershell and execute the command: Get-NetAdapter Ethernet. if you receive the message No MSFT_NetAdapter Objects found with property 'Name' equal to 'Ethernet'. then open your NIC settings and check the name of you network adapter. you may have 2 network adapters. check the one in network 192.168.56.x/24 and change its name to Ethernet.

2 - Get back to Powershell and execute the command: Get-NetAdapter Ethernet | set-DNSClient -RegisterThisConnectionsAddress $False. it will execute with no issue at all and you are free to continue your lab. image

Mayfly277 commented 6 months ago

I added some informations in the troubleshoot guide.