- Newest
- Most votes
- Most comments
When rebuilding an EC2 instance, especially after it has been onboarded to a service like Microsoft EDR (Endpoint Detection and Response), there are several things to check if the instance is not showing up with the correct IP address. Here are some steps and commands you can use to troubleshoot:
-
First, verify that the EC2 instance has the correct IP address assigned to it in AWS. You can do this by checking the instance details in the AWS Console or using the AWS CLI.
-
On the EC2 instance itself, you can use the following command to check the current IP address:
ip addr showorifconfig -
If the IP address is correct on the EC2 instance but not updating in the Microsoft EDR portal, you may need to force a re-registration of the EDR agent. Try restarting the EDR service:
sudo systemctl restart mdatp -
Check the EDR agent's connectivity:
mdatp connectivity testYou mentioned this was okay, but it's worth double-checking. -
Verify that there are no hardcoded IP addresses in the network configuration files. Check the following files:
/etc/sysconfig/network-scripts/ifcfg-eth0/etc/network/interfaces -
If you're using a custom AMI, ensure that it doesn't have any persistent network rules that might be interfering with IP assignment. Check for and possibly remove:
/etc/udev/rules.d/70-persistent-net.rules -
Ensure that the instance is configured to use DHCP for IP assignment rather than a static IP.
-
Check the system logs for any network-related errors:
sudo journalctl -u network.service -
If you're using an Elastic IP, make sure it's correctly associated with the new instance.
-
As a last resort, you may need to stop and start the EC2 instance (not just reboot) to force a new IP assignment.
If none of these steps resolve the issue, you may need to reach out to Microsoft EDR support for assistance with their agent configuration, as the problem might be on their end in terms of how they're tracking the instance's IP address.
Remember to document any changes you make and test connectivity after each modification to identify which change resolves the issue.
Sources
Troubleshoot status check failures on an unreachable EC2 Linux instance | AWS re:Post
EC2 instance from Snapshot not accessible | AWS re:Post
Relevant content
asked 2 years ago
asked 2 years ago
asked 8 years ago
- AWS OFFICIALUpdated 9 months ago
