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:
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/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 |
- clone latest source repository by
git clone https://www.github.com/openwrt/openwrt -b branch_name - Now change directory to openwrt by
cd openwrt.This is our<buildroot dir>for this guide.
- Update feeds:
./scripts/feeds update -a - Make downloaded package(s) available in make menuconfig:
- single package :
./scripts/feeds install <PACKAGENAME> - all packages :
./scripts/feeds install -a
- single 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
| 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(); |
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
| /* | |
| * Copyright (c) 2014 Nolan Lum <nolan@nolm.name> | |
| * | |
| * 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
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 | |
| # | |
| # 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 |
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
| #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 |
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 | |
| # | |
| # 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 |
NewerOlder