# Linux

# 1. Centos 8

nmcli connection reload				重启
5-2-1、手动(BOOTPROTO=none)
nmcli connection modify eth0 ipv4.method manual ipv4.addresses 192.168.123.206/24
5-2-2、dhcp(BOOTPROTO=dhcp)
nmcli connection modify eth0 ipv4.method auto
5-3、修改IP地址(IPADDR=192.168.123.206 PREFIX=24
nmcli connection modify eth0 ipv4.addresses 192.168.123.206/24
5-4、修改网关(GATEWAY=192.168.123.1)
nmcli connection modify eth0 ipv4.gateway 192.168.123.1
5-5、添加第二个IP地址(IPADDR1=172.16.10.10 PREFIX1=24
nmcli connection modify ens37 +ipv4.addresses 192.168.123.207/24
5-6、添加DNS(DNS1=192.168.1.19)
nmcli connection modify eth0 ipv4.dns 192.168.1.19
5-7、添加第二个DNS(DNS2=8.8.8.8)
nmcli connection modify eth0 +ipv4.dns 8.8.8.8
5-8、删除第二个DNS
nmcli connection modify ens37 -ipv4.dns 8.8.8.8

# 2.Windows 11

  • # cmd 命令

旧版本 开启/关闭  防火墙命令
#防火墙开放 21 号端口
netsh firewall set portopening tcp 21 enable 
#防火墙关闭 21 号端口
netsh firewall delete portopening protocol=TCP port=3389
新版本 开启/关闭  防火墙命令
#防火墙开放 80 号端口
netsh advfirewall firewall add rule name= "Open Port 80" dir=in action=allow protocol=TCP localport=80
#防火墙关闭 80 号端口
netsh advfirewall firewall delete rule name= rule name  protocol=udp localport=500
# 查看端口占用
netstat -ano | findstr port		#(查看端口 port 是否被占用)
# 解除端口占用
taskkill /f /t /im pid			#(终止 PID 为 pid 的进程)
taskkill /f /pid port			#(解除 port 端口的占用)

# 3.Docker 容器启动

# 启动 mkdocs 文档服务
$ docker run -itd --name mkdocs -v ~/docs:/docs -p 58000:8000 --workdir /docs/my-project squidfunk/mkdocs-material serve -a 0.0.0.0:8000

# DPS 测试

curl cip.cc
python /root/dps/changeip.py
更新于 阅读次数