From 58dc3e0810f201cd44f3ba4c1e1e07577fa4ff6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E5=A0=94=E4=B9=89?= Date: Wed, 26 Jun 2024 09:51:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BD=91=E7=BB=9C=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...21\347\273\234\345\221\275\344\273\244.md" | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 "48\346\235\216\345\240\224\344\271\211/20240625-\347\275\221\347\273\234\345\221\275\344\273\244.md" diff --git "a/48\346\235\216\345\240\224\344\271\211/20240625-\347\275\221\347\273\234\345\221\275\344\273\244.md" "b/48\346\235\216\345\240\224\344\271\211/20240625-\347\275\221\347\273\234\345\221\275\344\273\244.md" new file mode 100644 index 0000000..117c4e8 --- /dev/null +++ "b/48\346\235\216\345\240\224\344\271\211/20240625-\347\275\221\347\273\234\345\221\275\344\273\244.md" @@ -0,0 +1,46 @@ +1. IP(ifconfig) + 1. .address + 2. .reoute + +2.ping + +3.wget + +4.curl + +5.ssh ssh user@主机 ssh -l user 主机 + +6.netstat => ss + +1. .ss -tunl #以数字的形式显示正在监听的TCP和UDP端口 +2. .ss -tuna #以数字的形式显示所有的TCP和UDP(含监听和已连接) + +1.如何通过进程号反查服务名 + +ps -ef | grep 进程号 + +ps -aux | grep 进程号 + +ps -p | grep 进程号 + +2.结束服务所有的进程 + +killall 服务名 #严格匹配服务名 + +pkill -9 服务名 #pkill = pgrep +kill ,先模糊匹配,再结束 + +3.网络安全:端口安全,禁用非法访问端口,只允许指定的端口开放 + +4.防火墙:firewall ,一种安全机制,一种访问规则(不被允许的,默认就是禁止) + +1.ufw allow 端口/协议 #ufw allow 22/tcp + +2.ufw status #查看防火墙状态 + +3.ufw reload #重加载 + +4.ufw delete 第几个 #删除 + +安装防火墙 + +apt install ufw \ No newline at end of file -- Gitee