Anand
Anand

Reputation: 743

UDP Socket over cloud provider

I am using Appache Tomcat to host webpages that can be accessed by authenticated users and a UDP socket has been opened on port 14550 in which devices sends a stream of communication messages. The system is working fine in the local network. I tried to host the this in Openshift and later found that Openshift does not allow external UDP communication. Now I am considering Amazon EC2 instance, new VM in Azure or in GCP. I would like to know that will there be any issue in using the sockets from my application. Thank you in advance.

Upvotes: 0

Views: 253

Answers (1)

U.Swap
U.Swap

Reputation: 1949

No, on AWS EC2 everything is allowed, you just need to configure your Security Group to allow specific web traffic, UDP traffic can also be allowed their.

I was also looking for possible workaround for this issue, but it's quite easy irrespective of what platform language you are using to develop socket program on AWS EC2, as am using Node.js nginx in my case, this should work for all supporting platforms.

Configure Security Group

  1. In the AWS console, open the EC2 tab.
  2. Select the relevant region and click on Security Group.
  3. You should have an default security group if you have launched an Elastic Beanstalk instance in that region for your app.
  4. click on Actions button at top, and select Edit inbound rules.
  5. here in Type column select All UDP, or you can set some Custom UDP rule as well to listen at your socket port.
  6. And there just enter port of your UDP server Ex: 2020.

    And that's it!

Note: If something is not working, check the "Events" tab in the Beanstalk application / environments and find out what went wrong.

Upvotes: 1

Related Questions