Skip to content

This bash script create/update automatically a rule in AWS EC2 security group starting from a FQDN (dynamic dns)

Notifications You must be signed in to change notification settings

antoweb/awscli-secgroup-dns-to-ip-autoupdate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

PAYPAL DONTAION
paypal

awscli-secgroup-dns-to-ip-autoupdate

This bash script create/update automatically a rule in AWS EC2 security group starting from a FQDN (dynamic dns)

With this bash script you can simply add or update a security group aws ec2 rule with a dynamic ip using a Dynamic DNS name.

USAGE ISTRUCTIONS:

PREREQUISITES:

  • aws cli installed and configured

Please set the variable in top of script:

GROUPID= --> SECURITY GROUP ID
PROTOCOL=tcp --> PROTOCOL TO OPEN
PORT=22 --> PORT TO OPEN
PROFILE= --> PROFILE OF your aws cli (if you have more than one) else you can keep default
DDNSNAME= --> put your dynamic dns name like no-ip or ddns etc...

Copy this script to a machine with aws cli installed

Create a crontab to execute script every 5/10 minutes like:

*/5 * * * * /myscript/awscli-secgroup-dns-to-ip-autoupdate.sh

About

This bash script create/update automatically a rule in AWS EC2 security group starting from a FQDN (dynamic dns)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages