02 2022 档案
linux 脚本:iptables-secure.sh
摘要:#!/bin/bash # 2022.2.28 by dewan # secutiry configuration. usage () { echo "$0 start # setup secutiry configuration" echo "$0 add-ip <ip> # add whitel
linux 脚本:iptables-nat.sh
摘要:#!/bin/bash # 2022.2.28 by dewan # DNAT configuration. iptables -t nat -F PUB_IFACE="enp125s0f0" INT_IFACE="enp125s0f1" LAN="10.0.0.0/8 172.16.0.0/12
lsof 查看进程打开文件
摘要:参考文档:[lsof命令详解](https://www.cnblogs.com/wanng/p/lsof-cmd.html) `lsof`,列出系统中所有打开的文件。 **各列字段意义如下:** COMMAND: 进程的名称 PID: 进程标识符 USER: 进程所有者 FD: 文件描述符,应用程序
test.sh
摘要:#!/bin/bash echo " show OS version " cat /etc/os-release echo " show IP address for the host " hostname -I echo " show the default route " ip r | grep
Linux 概念:启动过程
摘要:目录服务器启动的一般流程1. 上电启动主板上的BIOS或者UEFI BIOS程序2. BIOS寻找并加载boot loader3. BootLoader 引导内核4. Kernel 加载 initramfs5. Initramfs 寻找并挂载根文件系统6. Systemd 启动操作系统7. 登录界面
linux 问题: ssh登录报错,ssh_exchange_identification,多次几次可以登录
摘要:分析 怀疑是句柄数不够,和ssh的最大登录限制 确认 2.1 确认句柄数 过程: ~# systemctl status sshd | grep -i pid Main PID: 3767395 (sshd) ~# lsof -p 3767395 | wc -l 82 # sysctl -a | g