Add an AWS Security group for GitHub SSH
Visit https://api.github.com/meta for the latest GitHub IP ranges
Copy all of the ranges in the git
section, and paste into a text editor
Replace
", "
with
,
In AWS console, navigate to Network & Security > Security Groups
Click on Create security group
Give the security group a name and description (for example: SSH GitHub)
Create an inbound and outbound rule
Remove the 0.0.0.0/0
from each rule
Paste the IP ranges from step #3 into the IP rages testbox
Click Create security group
Example IP ranges after editing
192.30.252.0/22, 185.199.108.0/22, 140.82.112.0/20, 143.55.64.0/20, 2a0a:a440::/29, 2606:50c0::/32, 13.114.40.48/32, 52.192.72.89/32, 52.69.186.44/32, 15.164.81.167/32, 52.78.231.108/32, 13.234.176.102/32, 13.234.210.38/32, 13.236.229.21/32, 13.237.44.5/32, 52.64.108.95/32, 20.201.28.151/32, 20.205.243.166/32, 102.133.202.242/32, 18.181.13.223/32, 54.238.117.237/32, 54.168.17.15/32, 3.34.26.58/32, 13.125.114.27/32, 3.7.2.84/32, 3.6.106.81/32, 52.63.152.235/32, 3.105.147.174/32, 3.106.158.203/32, 20.201.28.152/32, 20.205.243.160/32, 102.133.202.246/32