How to check the IP address your AWS resource is using
Taegu Kang
1 min read
- outline
AWS resources operate based on endpoints, but each has a private IP address and a public IP address. The most effective way to check which AWS resource is using the IP is to check network interfaces. You can find resources based on private IP, public IP, and IPv6 using the method below.
- check (AWS Web Console)
EC2
\> Network & Security
\> Network Interfaces
\> Search
- check (AWS CLI)
## every information about the resource that owns the Private IP you want to find
aws ec2 describe-network-interfaces --filters "Name=addresses.private-ip-address,Values=example-unknown-private-IPv4"
## basic information about the resource that owns the Private IP you want to find
aws ec2 describe-network-interfaces --query "NetworkInterfaces[*].{InterfaceType: InterfaceType, Description: Description, InstanceId: Attachment.InstanceId}" --filters "Name=addresses.private-ip-address,Values=example-unknown-private-IPv4"
## every information about the resource that owns the Public IP you want to find
aws ec2 describe-network-interfaces --filters "Name=association.public-ip,Values=example-unknown-public-IPv4"
## basic information about the resource that owns the Public IP you want to find
aws ec2 describe-network-interfaces --query "NetworkInterfaces[*].{InterfaceType: InterfaceType, Description: Description, InstanceId: Attachment.InstanceId}" --filters "Name=association.public-ip,Values=example-unknown-public-IPv4"
## every information about the resource that owns the IPv6 you want to find
aws ec2 describe-network-interfaces --filters "Name=ipv6-address,Values=example-unknown-IPv6"
## basic information about the resource that owns the IPv6 you want to find
aws ec2 describe-network-interfaces --query "NetworkInterfaces[*].{InterfaceType: InterfaceType, Description: Description, InstanceId: Attachment.InstanceId}" --filters "Name=ipv6-address,Values=example-unknown-IPv6"
- reference
https://repost.aws/knowledge-center/vpc-find-owner-unknown-ip-addresses
0
Subscribe to my newsletter
Read articles from Taegu Kang directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by