# Configure Security Group

This setting gives us to setup a farewell rule to add a security layer for code files, databases, etc. It is possible to restrict traffic for a specified section of this solution. By adding new security groups we specify various Ports that we setup in the code to give defined access to a specific user.

Beyond certain specific ports like 3005, 3010, 3014, 3015, 3050, 4050, 3838, 6051, 27017, and 3306 we also keep HTTP, HTTPS, and SSH ports open for this instance.

<figure><img src="https://427001601-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbsIR7VxGLBODWuqoCSps%2Fuploads%2F8o24Msm2SW7rN8JE18K8%2FConfigure%20Security%20Groups.png?alt=media&#x26;token=c98c1dd7-e658-40fb-9636-61a31d0dc818" alt=""><figcaption><p>Configure Security Groups - Ports</p></figcaption></figure>

**Quick Note:**

`-HTTP and HTTPS we keep open for players to allow requests from anywhere in the world.`

`-SSH to connect this EC2 instance from the local machine.`

`-Other mentioned ports have their own need which we used to increase the security to the next level.`

`-Make sure your protocols for each port should be defined as custom TCP.`
