Skip to content

Instantly share code, notes, and snippets.

@ph00lt0
Created March 18, 2022 19:40
Show Gist options
  • Save ph00lt0/9b574e03d96315b915f9c8b8544e4720 to your computer and use it in GitHub Desktop.
Save ph00lt0/9b574e03d96315b915f9c8b8544e4720 to your computer and use it in GitHub Desktop.
Add your ip to allow ssh from your current IP address to hetzner cloud through the Hetzner cli
ip=$(curl http://icanhazip.com)
hcloud firewall list
read -p "Enter the Firewall ID you want to add your IP to:" firewallID
hcloud firewall add-rule --direction in --protocol tcp --port 22 --source-ips $ip/32 $firewallID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment