unraid docker smokeping记录

加速源/docker.nju.edu.cn/linuxserver/smokeping:unraid

smokeping:unraid很重要 很重要 很重要

进入内部执行

#更换国内源
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories

#修改时区
 apk add -U tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && echo "Asia/Shanghai" > /etc/timezone && date -R

2023.11.21

源
docker.nju.edu.cn/linuxserver/smokeping

添加变量

名称:
时区

键:
TZ

值:
Asia/Shanghai

切到高级视图

额外参数设置dns …

crunchbits 11.69测试

第一次测试

yabs第一次测试  开机第一次测试

# ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## ## #
#              Yet-Another-Bench-Script              #
#                     v2023-04-23                    #
# https://github.com/masonr/yet-another-bench-script #
# ## ## ## ## ## ## ## ## 

tailscale and derper in dokcer

#############
# Tailscale Builder
#############

FROM golang:1.19-alpine as builder

WORKDIR /bin/
RUN go install tailscale.com/cmd/tailscale@main
RUN go install tailscale.com/cmd/tailscaled@main
RUN go install tailscale.com/cmd/derper@main

FROM alpine:latest as tailscale

WORKDIR /bin/
RUN apk add --no-cache ca-certificates iptables ip6tables iproute2 tzdata && \

haproxy docker quic

FROM ubuntu:20.04 AS builder-ssl

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get -y update && apt-get -y install git make gcc

RUN git clone --depth 1 https://github.com/quictls/openssl.git
RUN cd /openssl && ./config enable-tls1_3 && make -j$(nproc) && make install_sw

FROM ubuntu:20.04 AS builder

oracle修复引导记

存储 – 块存储卷 – 引导卷 – 找到要分离的名字点进去 – 附加的实例 – 从实例分离 – 附加到实例(选择半虚拟化)

fdisk -l
mount /dev/sdb2 /mnt
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
chroot /mnt
update-grub
#安装内核
exit

systemctl stop 

用nginx动态添加指定端口白名单

1.准备好域名及搭好https服务的nginx,这里以域名123.com为例,https://123.com需要能正常访问

2.需要设置白名单的服务搭好  这里以端口10086为例

下面教程为debian/ubuntu系统

预先准备的组件,若已安装可跳过

apt install rsyslog iptables nano -y

下载处理白名单程序

wget -O /usr/local/bin/selfhelp-iptables https://github.com/aoyouer/selfhelp-iptables/releases/download/2.3.4/selfhelp-iptables

赋予运行权限

chmod +x /usr/local/bin/selfhelp-iptables

添加nginx路径反代上面程序的端口
编辑nginx配置 路径仅供参考

nano /etc/nginx/conf.d/123.com

在location / 或者location其他路径下添加,这里/2表示后续通过访问https://123.com/2来添加白名单,按需修改路径

location /2 {
                proxy_set_header  X-real-ip $remote_addr;
                proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_pass 

windows远程桌面RDP3389开启两步验证

下载软件

https://download.multiotp.net/credential-provider/

安装VBVC运行库,64位下面两个都要安装

https://aka.ms/vs/16/release/vc_redist.x86.exe and https://aka.ms/vs/16/release/vc_redist.x64.exe

安装主体软件

勾上No remote server,其他默认 下一步

默认选中的 For remote desktop only (只有远程桌面开启两步验证)

下面的勾全去掉,不选

命令行开启两步验证及生成密钥图片 administrator改成你需要的用户,然后手机端扫描图片添加两步验证(如 authy)

"C:\Program Files (x86)\multiOTP\multiotp.exe" -fastcreatenopin administrator

"C:\Program Files (x86)\multiOTP\multiotp.exe" -qrcode administrator d:/123.png

参考

https://inc.sysu.edu.cn/article/1050…

静态编译ipset

#要求内核大于3.11
apt install gcc make libmnl-dev pkg-config wget tar gzip -y

cd /tmp
wget https://ipset.netfilter.org/ipset-7.15.tar.bz2
tar -jxvf ipset-7.15.tar.bz2
rm -rf ipset-7.15.tar.bz2
cd ipset-7.15/
#./configure
#./configure --enable-shared=no --enable-static=yes --prefix=/usr/local/ipset --disable-dependency-tracking

./configure --enable-shared=no --enable-static=yes --disable-dependency-tracking
make

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

使用docker在非443端口部署tailscale的derper中继服务器

前后一共折腾了不下5次,今天终于弄好了

这里使用的是非443端口,证书需要在宿主先申请好,我这里用的acme的cf api生成,教程这里忽略

证书这里举例用/root/crt/123.com.crt,KEY /root/crt/123.com.key,必须是域名.crt+域名.key形式

安装dokcer

curl -fsSL https://get.docker.com -o get-docker.sh && sh get-docker.sh

dcokcer运行,把/root/crt/ 映射进docker

docker run --restart unless-stopped --name derper -p 12345:12345 -p 3478:3478/udp -v /root/crt/:/crt/ -dt qctt/derper /derper -stun -a 0.0.0.0:12345 -hostname 123.com -certdir=/crt/ -certmode=manual

在tailscle控制页的Access Controls示例,OmitDefaultRegions …