My goal is to receive/send UDP packet traffic on specific ports on my EC2 instance (on my eth0 private IP) via my public IP.

I am asking because I have set my security group to allow all inbound/outbound traffic on the public IP. Even thought I set my security group for the all traffic category, the ports to the public IP are not all open. After running netcat -zv publicIP 1-80 on my local machine I can see that only ports 22 and 80 are open? In the higher range +49k, none are open. Is it just something I have configured wrong, and if so what else should be configuring in order to allow the UDP traffic on port XXXXX through, or is this not possible? Thanks!

  • Are your instances inside a VPC?
    – thexacre
    Mar 27, 2015 at 0:17
  • Yes and that VPC belongs to the security group that has its traffic set to allow all IP traffic both send/receive.
    – Nimjox
    Mar 27, 2015 at 1:31

2 Answers 2


Running netcat -zv publicIP 1-80 will show you only the open ports for TCP, not UDP. As testing for open UDP ports using netcat or nmap is tricky, i would recommend trying the following steps to confirm that your server is listening on specific UDP port and it can accept connections to that UDP port remotely.

  1. Stop the service listening on the specific port and run netcat -luv port, replace port with the port number of the service you are testing. This will make the server listen on the specified port number.

  2. From a remote host run echo "test" | netcat -vu publicIP port, replace publicIP and port with an IP address and port number respectively. If you the text 'test' gets displayed on the server in part (1), then all is good. Otherwise check your security group and local host firewall rules. You can also use tcpdump for troubleshooting.


Turned out that the corporate network which the client was sending out UDP packets on had it's ports blocked.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .