Question:
i need to run an instance and access with my ip address..but the problem is that myISP changes my IP adress every day.plz help me how do i create a security group so that my instance remains accessible even if my ip changes….
thanks in advance..
Answer:
Here’s a way to restrict AWS security group to your dynamic IP address for SSH.
You can write a cronjob to regularly repeat the steps below:
- Fetch external IP address (e.g. http://checkip.amazonaws.com/)
- Fetch security group details using AWS SDK
- Loop through all security rules, check for port
22
- If IP address mismatches that from step 1, update it.