This instruction is tested on Ubuntu 22.04 LTS
- UDP 4500
- UDP 500
- Custom protocol 50
-- Tit Petric, Monotek d.o.o., Thu 27 Oct 2016 10:43:38 AM CEST | |
-- | |
-- Delete nginx cached assets with a PURGE request against an endpoint | |
-- | |
local md5 = require 'md5' | |
function file_exists(name) | |
local f = io.open(name, "r") | |
if f~=nil then io.close(f) return true else return false end |
#!/usr/bin/env python3 | |
import sys | |
import json | |
def parse_value(value): | |
try: | |
# Try converting to integer | |
return int(value) | |
except ValueError: | |
try: |
REM Delete eval folder with licence key and options.xml which contains a reference to it | |
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do ( | |
for /d %%a in ("%USERPROFILE%\.%%I*") do ( | |
rd /s /q "%%a/config/eval" | |
del /q "%%a\config\options\other.xml" | |
) | |
) | |
REM Delete registry key and jetbrains folder (not sure if needet but however) | |
rmdir /s /q "%APPDATA%\JetBrains" |
#!/bin/bash | |
## Install Debian/Ubuntu | |
## https://think.unblog.ch/en/multiple-php-fpm-versions-with-apache-on-debian-12/ | |
## https://tecadmin.net/how-to-install-php-on-debian-11/ | |
## https://shape.host/resources/how-to-install-multiple-versions-of-php-on-debian-with-ispconfig | |
apt install -y lsb-release apt-transport-https ca-certificates wget gnupg | |
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg |
-- a quick LUA access script for nginx to check IP addresses against an | |
-- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
-- | |
-- allows for a common blacklist to be shared between a bunch of nginx | |
-- web servers using a remote redis instance. lookups are cached for a | |
-- configurable period of time. | |
-- | |
-- block an ip: | |
-- redis-cli SADD ip_blacklist 10.1.1.1 | |
-- remove an ip: |
import os | |
def on_starting(server): | |
""" | |
Attach a set of IDs that can be temporarily re-used. | |
Used on reloads when each worker exists twice. | |
""" | |
server._worker_id_overload = set() |
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
#!/bin/bash -e | |
# Quick start-stop-daemon example, derived from Debian /etc/init.d/ssh | |
NAME=blink | |
DIR=/home/pi | |
PIDFILE=/home/pi/$NAME.pid | |
DAEMON=/home/pi/pi_gpio_hack.py | |
DAEMON_ARGS="[[31,0,37,1],[31,1,37,0]]" | |
STOP_SIGNAL=INT |
### 1: Drop invalid packets ### | |
/sbin/iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP | |
### 2: Drop TCP packets that are new and are not SYN ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp ! --syn -m conntrack --ctstate NEW -j DROP | |
### 3: Drop SYN packets with suspicious MSS value ### | |
/sbin/iptables -t mangle -A PREROUTING -p tcp -m conntrack --ctstate NEW -m tcpmss ! --mss 536:65535 -j DROP | |
### 4: Block packets with bogus TCP flags ### |