Ubuntu 20.04 LTS
docker安装 x-ui
https://xtrojan.pro/bgfw/xray/x-ui-build-node.html
https://github.com/vaxilu/x-ui
安装docker
curl -fsSL https://get.docker.com | sh
安装x-ui
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
--name x-ui --restart=unless-stopped \
enwaiax/x-ui:latest
Build 自己的镜像
docker build -t x-ui .
chatgpt-web
docker run --name chatgpt-web -d -p 3003:3002 --restart=always --env OPENAI_API_KEY=申请的key chenzhaoyu94/chatgpt-web
warp
https://github.com/fscarmen/warp
wget -N https://raw.githubusercontent.com/fscarmen/warp/main/menu.sh && bash menu.sh [option] [lisence/url/token]
tailscale
https://tailscale.com/kb/1039/install-ubuntu-2004/
Add Tailscale’s package signing key and repository:
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/focal.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
Install Tailscale:
sudo apt-get update
sudo apt-get install tailscale
Connect your machine to your Tailscale network and authenticate in your browser:
sudo tailscale up
You’re connected! You can find your Tailscale IPv4 address by running:
tailscale ip -4
ufw
https://blog.csdn.net/ezreal_tao/article/details/82713270
https://zhuanlan.zhihu.com/p/628899663
安装方法
sudo apt-get install ufw
当然,这是有图形界面的(比较简陋),在新立得里搜索gufw试试……
使用方法
1 启用
sudo ufw enable
sudo ufw default deny
作用:开启了防火墙并随系统启动同时关闭所有外部对本机的访问(本机访问外部正常)。
2 关闭
sudo ufw disable
2 查看防火墙状态
sudo ufw status
3 开启/禁用相应端口或服务举例
sudo ufw allow 80 允许外部访问80端口
sudo ufw delete allow 80 禁止外部访问80 端口
sudo ufw allow from 192.168.1.1 允许此IP访问所有的本机端口
sudo ufw deny smtp 禁止外部访问smtp服务
sudo ufw delete allow smtp 删除上面建立的某条规则
sudo ufw deny proto tcp from 10.0.0.0/8 to 192.168.0.1 port 22 要拒绝所有的TCP流量从10.0.0.0/8 到192.168.0.1地址的22端口
可以允许所有RFC1918网络(局域网/无线局域网的)访问这个主机(/8,/16,/12是一种网络分级):
sudo ufw allow from 10.0.0.0/8
sudo ufw allow from 172.16.0.0/12
sudo ufw allow from 192.168.0.0/16
推荐设置
sudo apt-get install ufw
sudo ufw enable
sudo ufw default deny