This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Put all the domain names in domains.txt, one per line | |
# then run in the terminal: bash domains.sh | |
# this will print each domain in the terminal as it looks it up | |
# The result csv will contains the domain, IP & Nameservers in each column | |
# Give each column the relevant header titles | |
echo "Domain Name,IP Address,Nameserver,Nameserver,Nameserver,Nameserver,Nameserver" > domains.csv | |
while read domain |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 4 | head -n 1) | |
SERVER_NAME=vpn-$NEW_UUID | |
gcloud compute instances create $SERVER_NAME \ | |
--machine-type "n1-standard-1" \ | |
--image-family ubuntu-1604-lts \ | |
--image-project "ubuntu-os-cloud" \ | |
--boot-disk-size "20" \ | |
--boot-disk-type "pd-ssd" \ | |
--boot-disk-device-name "$NEW_UUID" \ |