Skip to content

Instantly share code, notes, and snippets.

@ph00lt0
Created March 18, 2022 19:41
Show Gist options
  • Save ph00lt0/41b5a6f420ed30dbdae879ec815a79bf to your computer and use it in GitHub Desktop.
Save ph00lt0/41b5a6f420ed30dbdae879ec815a79bf to your computer and use it in GitHub Desktop.
Delete 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 remove your IP to:" firewallID
hcloud firewall delete-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