在老旧的asus设备(ac68u)上 安装 tailscale 客户端

题外话

我这台ac68u确实太老了,已经快10个年头了。
即便刷了梅林系统,386版本,软件中心也没有tailscale的app。
这个老旧的软件中心,已经很多年没更新维护过了,因此要安装tailscale只能自己想办法了。

前置要求

  • 一台华硕的路由器,这里用的armhf的ac68U,官方固件、梅林固件都可以。
  • 有足够的jffs剩余空间,armhf版本的版本的tailscale+tailscaled要吃掉40M的空间。不够的可以上usb。当然,可以随意存在哪,不是非得jffs,脚本的绝对路径能找到就行。
  • 一个tailscale.sh脚本,用来启动tailscaled和tailscale。

浏览全部

来自民间的 nvidia的 vgpu 授权服务 fastapi-dls

转载来自

fastapi源码

FastAPI-DLS

Minimal Delegated License Service (DLS).

Compatibility tested with official DLS 2.0.1.

This service can be used without internet connection.
Only the clients need a connection to this service on configured port.

Official Links

  • https://git.collinwebdesigns.de/oscar.krause/fastapi-dls (Private Git)
  • https://gitea.publichub.eu/oscar.krause/fastapi-dls (Public Git)
  • https://hub.docker.com/r/collinwebdesigns/fastapi-dls (Docker-Hub collinwebdesigns/fastapi-dls:latest)

All other repositories are forks! (which is no bad – just for information and bug reports)

浏览全部

gen8 给 debian/ubuntu 安装 hp-ams (Agentless Management Service)

hpe 安装完 debian/ubuntu 系的linux系统后,会发现 ilo 里面的 ams(Agentless Management Service) 是不可用状态。而且官方的驱动页面也仅仅提供centos系的rpm包下载。因此,我们要自己想办法。

wget https://downloads.linux.hpe.com/SDR/repo/mcp/pool/non-free/hp-ams_2.8.3-3056.1ubuntu16_amd64.deb
sudo dpkg -i hp-ams_2.8.3-3056.1ubuntu16_amd64.deb

这样就装上了。

oracle cloud 的ubuntu系统下ufw 防火墙规则不生效处理

前言

  • 因为 oracle cloud的 linux 都是默认使用了iptables的防火墙规则,导致了ufw的规则不生效。
  • 如果你喜欢Iptables规则方式配置防火墙,使用Iptables就行。

干掉预制的Iptables规则

# 切换到超级用户
sudo -i
# 删除规则
rm -rf /etc/iptables
# 重启生效
reboot

云服务器 对外访问25端口被封 ? 利用iptables 绕过 被封的 output 25 port。

用 iptables 将 25出去的流量,转发到其他端口出去。

iptables -t nat -A OUTPUT -p tcp --dport 25 -j DNAT --to 10.0.0.10:10025

这里 将 25 端口出去的流量转发到了1025端口。

这里 10.0.0.10 为 代理服务器 的ip地址。

找一台正常发送25端口的服务器,配置成代理服务器。

  1. 安装postfix
sudo apt-get install postfix

sudo tee /etc/postfix/main.cf<<EOF
inet_interfaces = all
#inet_interfaces = localhost
mynetworks = 0.0.0.0/0
EOF

sudo systemctl restart postfix
  1. 配置被允许代理的服务器的ip。
sudo tee smtp-proxy.sh<<EOF
#!/bin/bash
# 被允许的ip
IPS=(
129.1.1.1
132.2.2.2
132.3.3.3
)
for IP in {IPS[@]}
do
iptables -t nat -A PREROUTING -p tcp -s{IP} --dport 10025 -j REDIRECT --to-ports 25
iptables -A INPUT -p tcp -s ${IP} --dport 25 -j ACCEPT
done
EOF

sudo chmod +x smtp-proxy.sh
./smtp-proxy.sh
  1. 配好防火墙:
sudo ufw default  deny
sudo ufw allow 10025
sudo ufw allow  from 129.1.1.1
sudo ufw allow  from 132.2.2.2
sudo ufw allow  from 132.3.3.3

ubuntu下 podman 转发端口 ufw 防火墙 不能放过( 不兼容) 的临时处理方案

podman的网络使用的是 iptables 的转发。不支持ufw开放/禁用 端口。
开了ufw防火墙后,podman 转发的端口基本上就只能本地访问了。这是个大坑

方法1

ifconfig

执行后,可以找到一些 cni-popdman0 这种的interface。
使用iptables对所有的相关cni都转发一下 例如:

iptables -I FORWARD -p tcp ! -i cni-podman0 -o cni-podman0 -j ACCEPT

这样,即使开启着 ufw。你的podman的端口也能通过外部访问了。
不过不安全。这是全部转发的端口都允许了。所以只是临时方案。否则只能关闭ufw(不能接受)

方法2

  • 编辑 /etc/default/ufw 修改 DEFAULT_FORWARD_POLICY 的值为 ACCEPT
  • sudo ufw reload