- Host multiple sites on a single server
- Use Let's Encrypt and force SSL on all subdomains
- Create an area for Let's Encrypt's ACME verification, but restrict this to specific host headers
- This is so we can auto-renew certs but prevent my server from responding to someone else's bogus enrollment request if they point DNS at my server and it responds to the validation
- Create an https
default_server
fallback, so my sites are isolated if tou type the ipv6only - Top security practices, with an A+ rating on SSLLabs.com scan
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 | |
iptables -F #Warning. Removes all rules | |
iptables --delete-chain trustedIPs | |
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
iptables -A INPUT -p tcp --dport ssh -j ACCEPT | |
iptables -N trustedIPs | |
iptables -A trustedIPs --src 1.1.1.1/32 -j ACCEPT #CIDR example | |
iptables -A trustedIPs --src 2.2.2.2 -j ACCEPT #Single IP Example | |
iptables -A INPUT -j DROP |
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
#!/usr/bin/python | |
# Modified from https://github.com/fake-name/DSP-W215-Poller | |
import time | |
import urllib.parse | |
import urllib.request | |
import random | |
DSP_OUTLET_IP = '192.168.1.2' | |
UPDATE_INTERVAL = 2 |
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 | |
myCollectionCount=`mongo -u user -p password database_name --quiet --eval 'db.getCollection("my_collection").count()'` | |
echo "my_collection Count: $myCollectionCount > disk.txt | |
echo >> disk.txt | |
df /dev/mapper/volume-group >> disk.txt | |
cat disk.txt | mail -S smtp="smtp.relay.tld:25" -r "From Name<fromemail@my.tld>" -s "Email Subject" -v "recipient1@my.tld" | |
rm disk.txt |
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
<NotepadPlus> | |
<UserLang name="go" ext="go"> | |
<Settings> | |
<Global caseIgnored="no" /> | |
<TreatAsSymbol comment="no" commentLine="no" /> | |
<Prefix words1="no" words2="no" words3="no" words4="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Delimiters">"'0"'0</Keywords> | |
<Keywords name="Folder+" /> |
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
@ECHO OFF | |
iisreset /stop | |
ECHO Deleting x86 Temporary ASP.NET Files... | |
for /d %%i in ("%systemroot%\Microsoft.Net\Framework\v*") do for /d %%f in ("%%i\Temporary ASP.NET Files\*") do RD /q/s "%%f" | |
ECHO Deleting x64 Temporary ASP.NET Files | |
for /d %%i in ("%systemroot%\Microsoft.Net\Framework64\v*") do for /d %%f in ("%%i\Temporary ASP.NET Files\*") do RD /q/s "%%f" |
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
@ECHO OFF | |
ECHO ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ | |
ECHO ³ Title Here ³ | |
ECHO ÃÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ´ | |
ECHO ³ Put all of your text here. It will be shown ³ | |
ECHO ³ in a nice table. ³ | |
ECHO ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ | |
ECHO. |
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
$Policy = "Unrestricted" | |
If ((get-ExecutionPolicy) -ne $Policy) { | |
Write-Host "Script Execution is disabled. Enabling it now" | |
Set-ExecutionPolicy $Policy -Force | |
Write-Host "Please Re-Run this script in a new powershell enviroment" | |
Exit | |
} |
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
rm -rf /etc/letsencrypt/live/${DOMAIN} | |
rm /etc/letsencrypt/renewal/${DOMAIN}.conf |
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
<# | |
Name: makewebm.ps1 | |
Version: 1.0 | |
Description: This script will take all image files in a folder and automagically generate a webm video file using some open source tools. | |
Usage: | |
powershell "& "C:\Scripts\makewebm.ps1" | |
Required Binaries: | |
- vpxenc.exe: https://github.com/balistof/NVP8/tree/master/vpx-vp8-debug-src-x86-win32mt-vs9-v1.0.0/bin/Win32 |