Which CU are you using?
Do you have a send connector created as this doc suggests? Are the default receive connectors correctly configured? You can view the default settings here: Receive connectors
You said it can't receive and send mails externally, does the mail sender get any NDR message? Track the message in powershell and post the results with personal information covered: Search message tracking logs
Let's start with error 4027:
- Initially, check if any Windows firewall rule is blocking a certain port.
- Secondly, make sure that you don’t have any kind of trouble in allowing other computers to communicate with your computer through Windows Firewall. You can try using the Incoming Connections troubleshooter to automatically find and fix some common problems.
- Check if any Exchange-related services are not working. The reason behind it can be the Net.tcp port sharing service. If this service is stopped or having any issue then Exchange will not install. Then you would need to start this service to continue with Exchange setup.
- Make sure to enable the IPv6. Also, ensure that the AD Subnet configuration is as per the Exchange environment.
If an Answer is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.