Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checking how does it know existing IP and modifies with new IP #2

Open
Naveen45202 opened this issue Jun 8, 2021 · 8 comments
Open

Comments

@Naveen45202
Copy link

First time when we add it creates new rule with IP in the security group, for the second time it successfully modifies the existing IP with new IP. I am wondering how does it exactly knows the existing IP address and modifies are we storing this old IP data elsewhere?

It would be helpful if you can explain me this here....

@piyushsonigra
Copy link
Owner

Hi @Naveen45202,
It uses https://checkip.amazonaws.com to get the current public IP for the user.
If you have created the rule in the security group using aws_ipadd and next time if your IP is changed then aws_ipadd matches rule configuration with existing rules in the security group and grab rule name which is same as to defined in aws_ipadd config file. Once aws_ipadd finds out the rule name then it checks the whitelisted IP in that rule and match with the current IP. If the existing whitelisted IP in the security group is different than the current Public IP, aws_ipadd will update IP in the security group rule for you.

@Naveen45202
Copy link
Author

Great, Is there possibility of using this aws_ipadd in windows operating system if not any workaround?

@piyushsonigra
Copy link
Owner

aws_ipadd is not available to directly use in windows but you can install Ubuntu in Windows and try using in Linux bash terminal as shown here

@Naveen45202
Copy link
Author

Can we modify multiple user rules with single config? Say we have multiple users using a security group where everyone's IP changes AWS credentails can't be provided to users so instead can we have this tool install in centralized server and through jenkins job allow user to modify their rule in security group ?

@piyushsonigra
Copy link
Owner

That kind of feature is not available right now but you can open PR to add a feature to pass public IP for the rule.

@tverkade
Copy link

tverkade commented Mar 4, 2022

I love this project, thank you! Is there a way that we can specify the public IP that's updated, though? I'm looking to update a couple of different dynamic public IPs for a few security groups, I've got dynamic DNS hostnames for them and I was hoping to find an easy way to make that work. Thanks!

@piyushsonigra
Copy link
Owner

Thanks, @tverkade for loving this project. In the next release, I would provide a feature to specify an IP that needs to be whitelisted in the security group.

@ixodie
Copy link

ixodie commented Dec 5, 2023

I'd like to see an option to add new allowed IPs versus always updating the same rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants