sudo apt install fail2ban -y
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
systemctl start fail2ban (status|stop|restart)
systemctl enable fail2ban
fail2ban-client status
fail2ban-client status nginx-4xx
# Ban IP:
#!/bin/sh | |
# https://crosp.net/blog/administration/routing-network-traffic-through-socks5-proxy-using-dd-wrt/ | |
# https://serverfault.com/questions/200635/best-way-to-clear-all-iptables-rules | |
PROXIFYING_MACHINE=192.168.82.192 | |
MACHINE_TO_PROXIFY=192.168.83.0/24 | |
NETWORK=192.168.83.0/24 | |
WAN_IP=192.168.81.1 | |
iptables -I PREROUTING 1 -t mangle -s $MACHINE_TO_PROXIFY ! -d $NETWORK -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3 |
const net = require('net') | |
net.createServer(client => { | |
client.once('data', data => { | |
client.write(Buffer.from([5, 0])); | |
client.once('data', data => { | |
data = [...data]; | |
let ver = data.shift(); | |
let cmd = data.shift(); //1: connect, 2: bind, 3: udp | |
let rsv = data.shift(); |
/* | |
* Copyright (c) 2014 Nolan Lum <[email protected]> | |
* | |
* Updated to support IPv6. Use the environment variable BIND_ADDR6. | |
*/ | |
/* | |
Copyright (C) 2000 Daniel Ryde | |
This library is free software; you can redistribute it and/or | |
modify it under the terms of the GNU Lesser General Public |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static
so that you can run ARM executables directly on linux
#! /bin/bash | |
# | |
# Diffusion youtube avec ffmpeg | |
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée. | |
VBR="2500k" # Bitrate de la vidéo en sortie | |
FPS="30" # FPS de la vidéo en sortie | |
QUAL="medium" # Preset de qualité FFMPEG | |
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube |
#include <stdio.h> | |
#include <sys/stat.h> | |
#include <sys/types.h> | |
#include <sys/mman.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <stdlib.h> | |
#define CHECK(thing) if (!(thing)) { perror(#thing); exit(1); } | |
#define MAX_PAGE_IN 104857600 |
#!/bin/bash | |
# | |
# This script configures WordPress file permissions based on recommendations | |
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions | |
# | |
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org> | |
# | |
WP_OWNER=www-data # <-- wordpress owner | |
WP_GROUP=www-data # <-- wordpress group | |
WP_ROOT=$1 # <-- wordpress root directory |
github recently switched to an https scheme as the default for cloning repos. as a side effect you may suddenly be prompted for a 'Username' and 'Password' when you push where, previously, you were able to do so without typing in credentials. the solution is to cause git to cache https credentials which is easy, since git uses curl under the covers
in your home directory create a file called '.netrc', for example
/Users/ahoward/.netrc
in it put these contents