Netcat

Netcat 安装 apt install netcat-openbsd IPv6 nc -6 通过域名测试端口 1-100 3 秒超时 nc -vz -w 3 smilx.cn 1-100 通过 ip 测试端口 1-100 3 秒超时 nc -vnz -w 3 192.168.2.1 1-100 TCP 聊天 服务端 nc -vl 666 客户端 nc -vn 192.168.2.1 666 UDP 聊天 服务端 nc -vlu 666 客户端 nc -vnu 192.168.2.1 666 TCP 传输文件 服务端 nc -vl 666 < test.txt 客户端 nc -vn 192.168.2.1 666 > text.txt

September 30, 2024 · Kevin

Netplan

Netplan 静态 IP network: version: 2 renderer: NetworkManager ethernets: end0: dhcp4: false dhcp6: false addresses: - 192.168.2.x/24 routes: - to: 0.0.0.0/0 via: 192.168.2.1 nameservers: addresses: [192.168.2.1] link-local: [] # 禁用ipv6 多网口桥接上网 任意端口插入 wan 后另外一个端口可以用来给其他设备上网,建议设备里固定 ip 自动分配可能会有问题 开启 ipv4 转发 /etc/sysctl.conf net/ipv4/ip_forward=1 桥接 network: version: 2 renderer: NetworkManager ethernets: end0: dhcp4: false dhcp6: false end1: dhcp4: false dhcp6: false bridges: br0: dhcp4: false dhcp6: false interfaces: - end0 - end1 addresses: - 192....

June 15, 2024 · Kevin