/imgs/avatar.webp

Codee的博客

UbuntuServer22LTS设置静态IP

编辑文档 1 sudo vim /etc/netplan/00-installer-config.yaml 添加以下内容 1 2 3 4 5 6 7 8 9 10 11 12 13 # This is the network config written by 'subiquity' network: renderer: networkd ethernets: ens33: addresses: - 192.168.254.132/24 # 获取静态ip地址 nameservers: addresses: [4.2.2.2, 8.8.8.8] routes: - to: default via: 192.168.254.2 # 网关IP version: 2

Linux折腾科学上网过程

1 v2raya代理文档地址: https://v2raya.org/docs/prologue/introduction/ 1.1 docker方式启动 1 2 3 4 5 6 7 8 9 10 11 12 13 docker run -d \ --restart=always \ --privileged \ --network=host \ --name v2raya \ -e V2RAYA_LOG_FILE=/tmp/v2raya.log \ -e V2RAYA_V2RAY_BIN=/usr/local/bin/v2ray \ -e V2RAYA_NFTABLES_SUPPORT=off \ -e IPTABLES_MODE=legacy \ -v /lib/modules:/lib/modules:ro \ -v /etc/resolv.conf:/etc/resolv.conf \

CentOS7设置静态IP

1 查看网关和子网掩码 2 修改网络配置ens33 1 cd /etc/sysconfig/network-scripts 添加如下内容 1 2 3 4 5 6 7 IPADDR=192.168.211.131 GATEWAY=192.168.211.2 NETMASK=255.255.255.0 DNS1=192.168.211.2 DNS2=8.8.8.8 DNS3=8.8.4.4 ONBOOT=yes 注意把ONBOOT=no改成YES,开机自动联网 参