- Newest
- Most votes
- Most comments
Not sure if I completely follow the piece that you are wanting to do, but I will try.
On the server side, when the process is listening on 0.0.0.0 that means it is listening on any IP that is configured on any NIC in the host. (i.e. the loopback address, link-local addresses, IPv4 and IPv6 addresses on the NICs on that instance.)
It sounds to me like you are wanting the process to listen on all IPs in the VPC? (This is the part I am not clear on.). This is not what listening on 0.0.0.0 on the local host represents. To change the dest on the client and have it arrive on the server, you have to add the new DEST IP to the server either as an additional IP on one of the existing NICs or as an additional NIC attached to the server.
I hope that I am following what you are wanting to do correctly.
NetCat server listening on a particular port and 0.0.0.0 does not mean that now I can see into all communication in the subnet for that port, usually on an instance packets are dropped if the destination IP of the incoming packet is not the instance's own ip, so it will log only those packets coming with destination as your server IP. Networking devices like a firewall can do this (listen to traffic which aren't destined to them )but for that other features need to be enabled.
It sounds like you're trying to "sniff" or "snoop" on all traffic in the VPC. That's not supported - the underlying VPC network does not allow that to happen; instances only receive traffic which is sent directly to them. While the VPC network looks like Ethernet, it is an overlay network that emulates most of the Ethernet semantics. For more information about this (if you're interested) definitely watch this YouTube video.
That said, if you do want to do packet sniffing, VPC traffic mirroring might be the answer. That said, it's unclear why you want to do this - there might be other better solutions depending on your use case.
Relevant content
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago