Skip to content

Instantly share code, notes, and snippets.

@hgati
Forked from ckcks12/add-private-network.sh
Created August 21, 2022 07:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hgati/3d08f61fb0f9ba4724f408d2107c78a1 to your computer and use it in GitHub Desktop.
Save hgati/3d08f61fb0f9ba4724f408d2107c78a1 to your computer and use it in GitHub Desktop.
vultr.com scripts
# echo setting
r='\033[0;31m'
y='\033[1;33m'
g='\033[0;32m'
b='\033[1;34m'
x='\033[0m'
function log() {
echo -e $@${x}
}
log Private Network Setting for ${y}vultr.com
log type the private network IP
read ip
cat >> /etc/network/interfaces << EOT
auto ens7
iface ens7 inet static
address ${ip}
netmask 255.255.0.0
mtu 1450
EOT
ifdown ens7
ifup ens7
log ${y}done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment