分类目录归档:日志

abuseipdb配合fail2ban自动提交bad ip

debian/ubuntu系列

#安装fail2ban
apt update && apt install fail2ban rsyslog -y

#配置 your-key改为你的abuseipdb  apikey
nano /etc/fail2ban/jail.local

[DEFAULT]
action_abuseipdb = abuseipdb

[sshd]
enabled = true
port    = ssh
logpath = %(sshd_log)s
backend = %(sshd_backend)s

action = %(action_)s
         %(action_abuseipdb)s[abuseipdb_apikey="your-key", abuseipdb_category="18,22"]


#如果之前有默认配置
mv /etc/fail2ban/jail.conf 

alpine lxc相关

更换源

sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories && apk update

 alpine lxc 开启ssh

apk add --no-cache openssh-server && cd /etc/ssh && ssh-keygen -A && rc-update add sshd boot && service sshd start

时区

apk add alpine-conf && /sbin/setup-timezone -z Asia/Shanghai && apk 

Linux一键安装常见/最新内核脚本 锐速/BBRPLUS/BBR2/BBR3 [100.0.2.9]

预先准备
centos:yum install ca-certificates wget -y && update-ca-trust force-enable
debian/ubuntu:apt-get install ca-certificates wget -y && update-ca-certificates

不卸载内核版本

wget -O tcpx.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcpx.sh" && chmod +x tcpx.sh && ./tcpx.sh

卸载内核版本

wget -O tcp.sh "https://github.com/ylx2016/Linux-NetSpeed/raw/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh 

提示:目前脚本对CN地址作了特殊处理,如果非CN地址

centos7 升级glibc 2.33

最新版本的glibc是2.34,但是编译失败了,这里已2.33为教程

安装高于4.8的gcc
yum -y install centos-release-scl
yum -y install devtoolset-11 bison ca-certificates


开启gcc11
scl enable devtoolset-11 bash

编译make
cd /usr/local/src/
wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar zxvf make-4.3.tar.gz && cd make-4.3
./configure && make -j && make install
ln -s -f /usr/local/bin/make /usr/bin/make

zenlayer ip range

from bgp.he.net

69.28.48.0/20
65.255.32.0/23
65.255.32.0/20
47.82.64.0/18
47.82.0.0/18
45.81.130.0/23
45.81.129.0/24
45.43.48.0/23
45.43.46.0/23
45.43.44.0/23
45.43.42.0/23
45.43.40.0/23
45.43.38.0/23
45.43.32.0/22
45.40.60.0/22
45.40.52.0/22
45.40.48.0/22
45.124.255.0/24
45.124.252.0/24
45.124.252.0/22
45.10.70.0/23
45.10.69.0/24
23.91.104.0/23
23.91.102.0/23
23.90.188.0/22
23.90.186.0/23
23.90.184.0/23
23.90.180.0/22
23.90.176.0/22
23.90.174.0/23
23.90.172.0/23
23.90.170.0/23
23.90.168.0/23
23.90.168.0/22
23.90.160.0/21
23.90.144.0/20
23.90.128.0/20
23.251.98.0/23

ucloud ip range

from bgp.he.net

45.43.63.0/24
45.43.62.0/24
45.43.61.0/24
45.43.60.0/24
45.43.58.0/24
45.43.57.0/24
45.43.56.0/24
45.43.55.0/24
45.43.54.0/24
45.43.53.0/24
45.43.52.0/24
45.43.37.0/24
45.43.36.0/24
45.40.57.0/24
45.40.56.0/24
45.249.247.0/24
45.249.246.0/24
45.249.245.0/24
45.249.244.0/24
42.240.240.0/20
42.240.224.0/20
42.240.208.0/20
42.240.192.0/20
42.240.176.0/20
42.240.144.0/20
42.240.128.0/20
36.255.223.0/24
36.255.222.0/24
36.255.221.0/24
36.255.220.0/24
23.91.98.0/24
23.91.97.0/24
23.91.96.0/24
23.91.101.0/24
23.91.100.0/24
23.248.185.0/24
23.248.184.0/24
23.248.163.0/24

docker/containers images地址收集

https://jenkins.linuxcontainers.org/view/Images/

https://jenkins.linuxcontainers.org/view/Images/job/image-centos/architecture=amd64,release=8-Stream,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-centos/architecture=amd64,release=7,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-centos/architecture=amd64,release=8,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz


https://jenkins.linuxcontainers.org/view/Images/job/image-debian/architecture=amd64,release=buster,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-debian/architecture=amd64,release=bullseye,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-debian/architecture=amd64,release=stretch,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz

https://jenkins.linuxcontainers.org/view/Images/job/image-debian/architecture=amd64,release=sid,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz


https://jenkins.linuxcontainers.org/view/Images/job/image-ubuntu/architecture=amd64,release=focal,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-ubuntu/architecture=amd64,release=bionic,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz
https://jenkins.linuxcontainers.org/view/Images/job/image-ubuntu/architecture=amd64,release=groovy,variant=cloud/lastSuccessfulBuild/artifact/rootfs.tar.xz

https://us.images.linuxcontainers.org/images/
https://mirrors.tuna.tsinghua.edu.cn/lxc-images/images/centos/8-Stream/amd64/cloud/

vmare ROM添加ntfs/exfat的uefi支持驱动

FFS v1.0 下载
https://github.com/pbatard/ffs/releases

驱动下载
http://efi.akeo.ie/downloads/efifs-latest/x64/

UEFITool 不能用NE版本
https://github.com/LongSoft/UEFITool/releases

从下面路径复制原版ROM  EFI32.ROM EFI64.ROM
C:\Program Files (x86)\VMware\VMware Workstation\x64

执行 GenMod ntfs_ia32.efi 生成ffs文件,最后一步添加文件时需要保持ffs和efi文件在一起

UEFITool 加载ROM 下面路径Insert After and select 或者remove
UEFI Image → 8C8CE578-8A3D-4F1C-9935-896185C32DD3 → 20BC8AC9-94D1-4208-AB28-5D673FD73486 → EE4E5898-3914-4259-9D6E-DC7BD79403CF → Volume Image Section → 

debian8 新更新源

nano /etc/apt/sources.list
deb http://cdn-fastly.deb.debian.org/debian/ jessie main
deb-src http://cdn-fastly.deb.debian.org/debian/ jessie main

deb http://security.debian.org/ jessie/updates main
deb-src http://security.debian.org/ jessie/updates main

deb http://archive.debian.org/debian jessie-backports main
deb-src http://archive.debian.org/debian jessie-backports main

nano /etc/apt/apt.conf
Acquire::Check-Valid-Until "false";

apt-get install htop nano  -t jessie-backports
apt-get update && apt-get