Skip to content

Instantly share code, notes, and snippets.

@sl-he
sl-he / README.md
Created November 6, 2023 22:12 — forked from strfry/README.md
Deploys FreeBSD on a Hetzner cloud server

Deploys FreeBSD on a Hetzner cloud server

Prerequisites:

  • A Hetzner Cloud API Token (Pass in via APIKEY)
  • jq
  • sshpass

Usage

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
@sl-he
sl-he / parity_on_hetzner.md
Created May 21, 2020 10:56 — forked from suenot/parity_on_hetzner.md
parity on hetzner

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