how do I make ec2 instance port secure, I mean I want to make ec2 instance secure to avoid DDoS attacks without using another service like AWS shield
CodePudding user response:
AWS provides the ability to associate Security Groups with each Amazon EC2 instance. In fact, multiple security groups can be attached to each instance.
By default, all ports are 'secure' -- meaning that no access is available to the ports from outside the instance.
To open up access to a port, you can add a Rule to a Security Group and associated the Security Group with the instance. For example, you could add a rule to the Inbound security group that permits access on port 22 (SSH) from your own IP address. This means that you can use SSH to connect to the instance, but nobody else can access the port.
If the EC2 instance is running a web server that you want accessible from the Internet, you would add two rules to the Inbound security group to allow ports 80 (HTTP) and 443 (HTTPS) from Anywhere. Any ports not mentioned will remain inaccessible (or 'secure' as you say it). However, any ports that are open can still be targets of DDoS attacks.
You can use AWS services to avoid DDoS attacks (eg AWS Shield, Load Balancers, CloudFront, AWS WAF) but additional charges will apply.
CodePudding user response:
how do I make the RDS MySQL port secure to avoid kind of DDoS attacks without using another service like AWS shield
