-
SSH into proxmox node and become root user. Run the following commands to download extra software dependencies we'll need.
apt update apt install -y libsasl2-modules mailutils
-
Enable 2FA for the gmail account that will be used by going to security settings
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 | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <[email protected]> | |
# Modified by: Grigory Stupnikov | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# |
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
version: '3.1' | |
# ./buildserver_pgdata - Postgres DB data | |
# ./data - TeamCity data directory | |
# ./teamcity-server-logs1 - logs of primary TeamCity server | |
# ./teamcity-server-logs2 - logs of secondary TeamCity server (running-builds node) | |
# ./teamcity-server-logs3 - logs of read-only TeamCity server (secondary node) | |
# ./teamcity-agent-conf1 - conf directory for the build agent | |
# ./teamcity-agent-conf2 - conf directory for the build agent | |
# ./teamcity-agent-conf3 - conf directory for the build agent |
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 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
# 1. Open the file | |
file = open("some_file.txt") | |
# 2. Perform some operations with the file | |
text_data = file.read() | |
# 3. Close the file | |
file.close() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 | |
# Author: Amith Chandrappa | |
# Usage | |
# Options: | |
# -t: To Emails, Separated by ";" | |
# -c: CC Emails, Separated by ";" | |
# -b: BCC Emails, Separated by ";" | |
# -s: Subject | |
# -o: Email body |
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
This is a quick brain dump to hopefully help explain the other files here. | |
/etc/network/interfaces is from my working proxmox install with an overly complicated VLAN setup. All configuration is | |
based off a forum post by x307 which I have copied here for reference. | |
My server has 2 sets of NICs hooked up to 2 seperate switches, my main switch runs traffic for management, applications, | |
and general home devices. I have a seperate swtich for SAN and Corosync traffic. | |
eno1 & eno2 are onboard NICs that are teamed in a LAG to the main switch. Proxmox has an IP address on VLAN 10 for | |
management, VMs can then access VLANs 1, 10, 20 and 999 through the LAG as needed (home, management, applications and |
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
<?php | |
// This script receives DDNS updates via HTTP | |
// example: http://server/ddns-api.php?name=home = updates home.domain.com to IP of requester | |
define('DDNS_DATA_FILE', '/home/ddns/ddns.json'); | |
define('DDNS_DOMAIN', 'example.com'); | |
header("Content-type: text/plain"); |