Hosting a game on AWS

I’m trying to host a game on amazon EC2 with a windows 2016 instance.

I forwarded to ports in security group and applied this to my instance. I had to forward TCP 7171 and 7172. I set them to 0.0.0.0/0. I also disabled windows firewall on the instance.

However, when I try to check and see if the ports are open (canyouseeme.org), it returns that the ports are “blocked”. But if I try a different one I didn’t open (ex. 7175), it says ‘connection refused’.

I remember I used to have to set a static IP on my PC and forward my ports when I used to host this at home.

Can someone try to help me get my game working?

Thank you!

Update: I got it figured out. The server was never running so nothing was listening for 7171/7172!! Thank you everyone


Related discussions:

Can you post some screenshots of your security group?

Is windows firewall off on the instance? That might be useful for troubleshooting.

Windows firewall is totally disabled on the Windows instance. RDP works, and I’m not sure why basically doing the same thing doesn’t allow me through. I also tried adding inbound rules to accept 7171 and 7172 (despite Firewall being off).

Is 7171 and 7172 actually listening on the instance, and not just listening for localhost? You can check with netstat -an.

After disabling Windows Firewall, you often need to restart the instance for the change to take effect.

Looks good. A couple of things to try:

-Can you telnet to localhost 7171 and 7172 from the windows instance?
-Check the application logs for errors or information on the issue.
-Use Wireshark to sniff the TCP ports for traffic while trying to connect.

You need to figure out if it’s a network or application issue.

And yikes - you should not leave 22 and 3389 open to the world.

Proto Local Address Foreign Address State
TCP 172.31.46.241:3389 207.38.231.xxx:1520 CLOSE_WAIT
TCP 172.31.46.241:3389 207.38.231.xxx:1532 CLOSE_WAIT
TCP 172.31.46.241:3389 207.38.231.xxx:1538 ESTABLISHED
TCP 172.31.46.241:50743 65.52.108.xxx:443 ESTABLISHED
TCP 172.31.46.241:50745 40.87.63.xxx:80 ESTABLISHED
TCP 172.31.46.241:50746 23.196.115.xxx:80 TIME_WAIT

It’s just testing mode nothing is on the server. Once I figure out how to even get my game working I can then move onto security. Thanks for the tip :slight_smile:

Configurations seem ok. You could try on focusing on test the application. Check logs to gather more information and try to connect to said ports using tools like telnet

While nothing is on the server, the ability to cause you significance financial distress is - if someone else has access to the machine they may be able to get access to your account and start spawning insane instances.

Well if I can’t even get this to work I’ll just stop using AWS entirely and move to dedicated hosting or something. I’ve never had difficulty using them, just figured I’d try AWS.

There’s nothing listed there for 7171 and 7172. So the service isn’t running, or it isn’t running on 7171 and 7172. Have you installed it and started the service?

Why not, exactly?

I mean, it’s possible this user isn’t going to configure them securely, so okay, fine, but those are remote administration ports, and if the client you remotely administer with is mobile and/or lives behind a dynamic IP, there’s no compelling reason not to open those ports to the world, especially for such a trivial use case.

Yeah, you open yourself to brute force attacks, but who cares? Anyone who discovers any open port on that system is going to brute force attack those open ports, it’s part of living on the public internet.

Don’t go scarin’ people with this nonsense.

For business use cases, it can be best to restrict access of those ports to specific cidr ranges, usually that belong to your office, but you’re going to have to provide a more compelling argument for why this merits a “yikes!”

You guys… leaving ssh and rdp open to the world is not that scary a proposition as long as they’re configured decently.

Unless it’s because you’re afraid this user’s inexperience configuring secure servers is going to bite them, I’m not sure why people are acting like this is such a big deal, and if that’s the case, specify that.

Yeah, it’s safer to lock it down to the user’s home IP address, sure, but people are acting like it’s ridiculous to open these ports to the wider internet, and it’s really not that uncommon.

You can certainly find a lot of great bare metal dedicated hostess who will give you far more performance than aws for cheaper. Try Packet.net or Vultr.

You bet! :slight_smile: You might also be able to use a ‘telnet localhost 7172’ command to see if the port is answering.

Dynamic IPs will continue to renew their lease if they’re on constantly. I’ve been running dynamic IP - with the same IP - on my cable modem for four years.

Best case scenario is that this is just for testing and maybe he doesn’t care if he loses a trash instance that he’s testing on, but I’d rather not lose that effort to a brute force attack. Especially if there are other computers in that VPC. Or if I used the same password I use on lots of stuff.

Part of living with the public internet is safeguarding yourself as much as possible. The merits of locking down 22 and 3389 far outweigh the inconvenience of having to change the source to “My IP” when you’re making a security group rule. :slight_smile: Just a best practice thing.

A downvote for this? Has someone had a dissimilar experience? I’ve often needed to restart Windows after disabling the service.

Source: Slingin’ Windows since NT4

Lock that shit down to a key. I agree with you that it’s best to be pessimistic about security, but you can configure these services securely enough to be able to expose them to the public internet at large.

I mean that’s part of the point of those services, is that they can be publicly exposed and secured simultaneously.

Again, I don’t disagree that it’s better to err on the side of caution, but it’s not that fuckin’ scary, guys. And yeah, this user probably should restrict access to those ports, because they are asking noobish questions, which means they may not have the experience to harden those services at the host level, but again, folks in the thread are acting like it’s ridiculous to expose these ports publicly, and that completely ignores a valid use case of these services.