ben-ha / azureipfollower

Allow access to Azure machines only for your IP automatically

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

azureipfollower

Allow access to Azure machines only from your dynamic IP, automatically.

Objective

Provide a simple way to restrict access to Azure machines (for example from your home connection), without deploying complex solutions.

Configuration

Environment variable Details Requirement Example
NSG_AND_RESOURCE Pairs of NSG and resource groups to apply the rule on separated by a space Required
NSG1:MYGROUP1 NSG2:MYGROUP2
SLEEP_TIME Time to wait between update iterations in seconds. The default is 5 minutes Optional
SLEEP_TIME=500

One time setup

  1. Run setup.sh and follow the instructions to generate a service principal for the docker container.
  2. Save the .env file which contains all the needed login information

Deploy

  1. Pull the container
    1. docker pull benhh1/azureipfollower
  2. Configure the container to run with the environment variables from the .env file and from the configuration section.

Enjoy!

About

Allow access to Azure machines only for your IP automatically

License:MIT License


Languages

Language:Shell 90.1%Language:Dockerfile 9.9%