# Chanage directories to /tmp
cd /tmp
# Download the Generic Cloud image from the distro downloads
wget https://Link_to_Generic_Cloud_image.com
# Validate the file is a QEMU QCOW2 image.
file ./Generic_Cloud_Image.qcow2
# Set this to your Proxmox host name; it's case sensitive! Check with `pvesh ls /nodes`
This file contains 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
// ==UserScript== | |
// @name noVNC Paste for Proxmox | |
// @namespace http://tampermonkey.net/ | |
// @version 0.2a | |
// @description Pastes text into a noVNC window (for use with Proxmox specifically) | |
// @author Chester Enright | |
// @match https://* | |
// @include /^.*novnc.*/ | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @grant none |
Block or filter IPs based on location in Nginx (tested on 1.18.0) on Ubuntu 20.04.
To make use of the geographical filtering, we must first install the Nginx GeoIP module as well as the GeoIP database containing the mappings between visitors’ IP addresses and their respective countries. To do so, let’s execute:
$ sudo apt install libnginx-mod-http-geoip geoip-database
This file contains 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 | |
set -o errexit | |
clear | |
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n" | |
### HOW TO USE | |
### Pre-req: | |
### - run on a Proxmox 6 server | |
### - a dhcp server should be active on vmbr1 |
This file contains 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/sh | |
# Cloudflare API v.4 Variables | |
CF_APIKEY='Your API Key Here' | |
CF_ZONEID='The Zone ID here' # Found on your Cloudflare Dashboard | |
CF_DNSID='The DNS ID here' # Found by listing DNS with Cloudflare API, see below for command | |
CF_EMAIL='your@email.address' | |
CF_DNS='address.domain.com' | |
GET_IP=$(dig +short txt ch whoami.cloudflare @1.0.0.1) |
This file contains 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 | |
# Requires Bash version 4+ because it uses dictionaries/arrays | |
# Define the 2 project IDs | |
# I assume the same user has access to both projects | |
OLD_PROJECT=INSERT_OLD_PROJECT_ID; | |
NEW_PROJECT=INSERT_NEW_PROJECT_ID; | |
# Maintain a dictionary of volume IDs to VM names so that we can attach to the correct VM later | |
# Detach the non-boot volumes from the VMs in the old project and transfer them to the new project |
This file contains 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
# Possibly obsolete: k3d create --name testcls1 --workers 3 | |
k3d create --name testcls1 --workers 3 --server-arg "--no-deploy=traefik" --server-arg "--no-deploy=servicelb" | |
# UPDATE: in newer versions onwards, this has evolved to (thanks to comments below): | |
k3d cluster create --k3s-arg "--no-deploy=traefik@server:*" |
This file contains 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 | |
# | |
# REQUIRES | |
# - netstat - to retrieve network stack details | |
# - sysctl - to retrieve/modify kernel settings | |
# - bc - for math | |
# | |
# MIT License | |
# | |
# Copyright 2020 John H Patton, JH Patton Consulting, LLC |
NewerOlder