随笔分类 -  Network

摘要:一、概要 1. 环境 (1) Rocky Linux 9.3 2. 承上启下 Linux firewalld 系列 二、ntftables 1. 查看 (1) 查看所有nft规则 sudo nft list ruleset 三、引用 1. 官方 https://access.redhat.com/d 阅读全文
posted @ 2023-12-14 22:17 白马黑衣 阅读(178) 评论(0) 推荐(0)
摘要:一、概要 1. 环境 (1) CentOS 7 (2) Rocky Linux 9.1 (3) Rocky Linux 9.3 二、配置 1. 配置文件 (1) DNS的配置文件位于: /etc/resolv.conf 从CentOS7开始,该文件由NetworkManager维护,可直接修改,也可 阅读全文
posted @ 2023-12-10 17:39 白马黑衣 阅读(499) 评论(0) 推荐(0)
摘要:一、概要 1. 环境 Rocky Linux 9.3 二、配置 1. hostname sudo hostnamectl set-hostname <hostname> 2. IP (1) 找到当前网卡 nmcli device show GENERAL.DEVICE为当前网卡。 (2) 查看当前网 阅读全文
posted @ 2023-11-26 21:56 白马黑衣 阅读(933) 评论(0) 推荐(0)
摘要:一、方法 1. 使用命令 netstat [-acCeFghilMnNoprstuvVwx][-A<网络类型>][--ip] 2. 脚本 (1) 创建 vi test.sh (2) 初始化 if netstat -an | grep "$1" | grep -i listen >/dev/null 阅读全文
posted @ 2023-07-29 20:46 白马黑衣 阅读(788) 评论(0) 推荐(0)
摘要:一、参考 https://www.cyberciti.biz/faq/how-to-list-all-iptables-rules-in-linux/ https://www.cyberciti.biz/faq/linux-iptables-delete-prerouting-rule-comman 阅读全文
posted @ 2023-07-09 22:29 白马黑衣 阅读(13) 评论(0) 推荐(0)
摘要:一、概要 1. 环境 Rocky Linux 9.1 CentOS 7.9 二、配置 1. sysctl服务 (1) 检查状态 systemctl status sysctl (2) 开启 sudo systemctl start sysctl sudo systemctl enable sysct 阅读全文
posted @ 2023-06-23 11:35 白马黑衣 阅读(450) 评论(0) 推荐(0)
摘要:一、概要 1. 环境 CentOS 7.9 2009 Rocky Linux 9.3 二、场景 1. 查看所有端口占用情况 (1) 安装net-tools sudo yum install net-tools -y #CentOS 7 sudo dnf install net-tools -y #R 阅读全文
posted @ 2023-02-25 10:34 白马黑衣 阅读(474) 评论(0) 推荐(0)
摘要:一、概要 1. 环境 (1) CentOS 7 (2) Rocky Linux 9.3 2. 承上启下 Linux firewalld 系列 二、firewalld服务 1. 查看状态 systemctl status firewalld 2. 开启 sudo systemctl start fir 阅读全文
posted @ 2021-02-01 10:37 白马黑衣 阅读(482) 评论(0) 推荐(0)