Deploys FreeBSD on a Hetzner cloud server
- A Hetzner Cloud API Token (Pass in via APIKEY)
- jq
- sshpass
Replace server_id variable with your hetzner server Id
#!/bin/bash | |
set -e | |
vote_account="/root/solana/vote-account-keypair.json" | |
identity_account="/root/solana/validator-identity.json" | |
new_stake="/root/solana/validator-stake-keypair-$(printf '%(%Y-%m-%d)T').json" | |
min_withdraw=100 | |
available_for_withdraw=$(solana balance $vote_account | awk -F\. '{print $1}') | |
re='^[0-9]+$' | |
if ! [[ $available_for_withdraw =~ $re ]] ; then |
Block reserved IPS:
iptables -A OUTPUT -p tcp -s 0/0 -d 0.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 10.0.0.0/8 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 100.64.0.0/10 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 169.254.0.0/16 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 172.16.0.0/12 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.0.0/24 -j DROP
iptables -A OUTPUT -p tcp -s 0/0 -d 192.0.2.0/24 -j DROP