How to open a port

0

Hello,

I just setup a lightsail Centos 8 instance and also installed firewalld. I am trying to open port 3306 for MySQL.

I did the following commands and each time got a success response:

sudo firewall-cmd --zone=public --permanent --add-port=3306/tcp sudo firewall-cmd --reload

sudo firewall-cmd --zone=public --permanent ----add-service=mysql sudo firewall-cmd --reload

Online open port checker, https://www.yougetsignal.com/tools/open-ports/ shows its closed.

Been self-hosting this database for several months from my home CentOS 8 server but wanted to move it somewhere for reliability.

Any help or suggestions would be greatly appreciated!

TIA

2 Answers
2

It sounds like you opened the port on the local firewall daemon but it's being blocked at another level. Did you ensure the AWS security group is allowing the connection as well? Here's some more information on Amazon EC2 Instance security groups. They act as a virtual firewall for your EC2 instances to control incoming and outgoing traffic so there could be a hang up there as well. It might also be worth looking into the VPC Reachability Analyzer which is a configuration analysis tool that enables you to perform connectivity testing between a source resource and a destination resource in your virtual private clouds. It will produce a hop-by-hop map of the virtual network path between the source and the destination. When the destination is not reachable, Reachability Analyzer identifies the blocking component. And of course, if all else fails, I'd recommend you open a Support case with Amazon Support, if none of the above works, they'll be able to quickly get you sorted.

AWS
AWSJoe
answered 2 years ago
0

I figured it out. Have to open from the networking tab.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions