crazy-canux / crazy-canux.github.io

Welcome to my personal home page.
https://crazy-canux.github.io/
1 stars 0 forks source link

Command #73

Open crazy-canux opened 1 year ago

crazy-canux commented 1 year ago

https://canuxcheng.com/post/network_command/

telnet telnet nc/netcat // 有的系统默认安装netcat-traditional $ sudo apt-get install netcat-traditional // 安装netcat-openbsd $ sudo apt-get install netcat-openbsd // 设置默认值 $ sudo update-alternatives --config nc $ sudo update-alternatives --set nc /bin/nc.openbsd nc -z IP PORT # 查看指定tcp://ip:port是否监听 nc -zu IP PORT # 查看udp://ip:port是否监听 // 通过nc监听端口 nc -l PORT // 通过nc发送请求. echo -e '{"method":"test","params":["test"],"id":1}' | nc IP PORT ping $ sudo apt-get install iputils-ping ping # 用于确定网络的连通性 ifconfig $ sudo apt-get install net-tools ifconfig # 查看up的interface ifconfig -a # 查看所有的interface ifconfig <bridge>/<interface> up/down brctl $ sudo apt-get install bridge-utils brctl show brctl addbr <bridge> # 添加bridge brctl delbr <bridge> # 删除bridge brctl addif <bridge> <interface> # 绑定interface到bridge brctl delif <bridge> <interface> # 删除bridge上的interface route route # 操作路由表的命令 route -n ip $ sudo apt-get install iproute2 link