Year: 2026
-

-

Batch generation of nginx configuration files
first,need a template file like this: all the domain in file : domain_moneyslow.txt next , a shell for create config file from domain_moneyslow.txt and template :
-

-
ubuntu22.04 strongswan swanctl
https://pcvogel.sarakura.net/2024/05/01/42720 只允许用户从一个终端登录上来(第二个终端登录,会踢掉第一个终端): monitor connections: https://medium.com/@prasanth.swaminathan/tiny-experiments-2-exploring-strongswans-commands-to-manage-and-monitor-ipsec-connections-63c5c7c3ea1c
-

-

ubuntu22.04 auto run on startup iptables -t nat -A POSTROUTING -j MASQUERADE
在 Ubuntu 22.04 中,由于系统默认使用 systemd 且 iptables 规则重启后会丢失,要实现开机自动执行这条 NAT 转发规则,最可靠的方式是通过 systemd 服务来实现。以下是详细步骤: 新建一个文件 /usr/local/bin/iptables-nat.sh ,内容: chmod +x /usr/local/bin/iptables-nat.sh 再新建一个启动文件:/etc/systemd/system/iptables-nat.service systemctl daemon-reloadsystemctl enable iptables-nat.servicesystemctl start iptables-nat.service 以下是验证: