VLAN 是二层的概念,因此在进行路由(三层)的时候,数据帧头(vlan tag)已被剥离,在完成路由后,如果出接口是trunk类型,新的vlan tag(目标vlan的tag)会被添加到数据帧头再发出
参考:
VLAN 是二层的概念,因此在进行路由(三层)的时候,数据帧头(vlan tag)已被剥离,在完成路由后,如果出接口是trunk类型,新的vlan tag(目标vlan的tag)会被添加到数据帧头再发出
参考:
Windows时间服务是Active
Directory域正常运行的基础功能。AD主身份验证协议Kerberos使用W32Time(Windows时间)时间服务来正常运行。在AD环境中,时间同步是按照严格的层次结构进行的:加入域的电脑和服务器从距离最近的域控制器获取时间,所有域控制器与拥有FSMO角色的PDC
Emulator的单个DC同步
PDC模拟器(Primary Domain Controller)与外部时间源同步时间。外部时间源通常是一个或多个公共NTP服务器
所有版本的Windows都有W32Time服务,这个服务用于和AD同步时间。一台电脑可以同时作为NTP服务端和客户端,默认情况下,加域的客户端电脑使用Windows时间服务来同步时间而不是使用NTP
Windows时间服务的默认情况如下:
使用GPO配置PDC DC的NTP:(注意此域策略只作用于域控制器)
Computer Configuration > Administrative Templates > System > Windows Time Service > Time Providers
使用GPO配置客户端时间同步:
Computer Configuration > Administrative Templates > System > Windows Time Service > Time Providers
NTP和NT5DS的区别:
参考:
https://theitbros.com/configure-ntp-time-sync-group-policy/
http://www.sysadminlab.net/windows/configuring-ntp-on-windows-using-gpo
从 IOS12 升级到 IOS15
1. 下载IOS软件,链接https://software.cisco.com/download/home/279963518/type/280805680/release/15.0.2-SE11(须先登录 Cisco 账户)
2. 通过 TFTP 传输 .bin 文件到交换机 flash
copy tftp://192.168.1.10/c2960-lanbasek9-mz.150-2.SE11.bin flash:/c2960-lanbasek9-mz.150-2.SE11.bin3.
(config)#boot enable-break更改启动镜像文件
(config)#boot system flash:/c2960-lanbasek9-mz.150-2.SE11.bin保存
(config)#do write重启
(config)#do reload
参考:
https://www.nazaudy.com/how-to-upgrade-the-ios-version-in-cisco-switch-c2960s
在 nginx 配置文件添加:
add_header X-Frame-Options SAMEORIGIN;
三个选项:
DENY
表示该页面不允许在 frame 中展示,即便是在相同域名的页面中嵌套也不允许。
SAMEORIGIN
表示该页面可以在相同域名页面的 frame 中展示。
ALLOW-FROM URI
表示该页面可以在指定来源的 frame 中展示。
注: 在网页中设置meta标签是无用的!例如,<meta http-equiv="X-Frame-Options" content="deny"> 是没有效果的。不要使用这种方式。需要在下面的配置实例中配置HTTP Header的方式来进行配置,X-Frame-Options才会起作用。
参考:
https://www.imperva.com/learn/application-security/clickjacking/
https://www.jianshu.com/p/51cc683402f0
需要 Systemd 等待 nginx 创建 PID 文件之后再往下执行
1. 在服务配置文件 /usr/lib/systemd/system/nginx.service 添加一行:
ExecStartPost=/bin/sleep 0.1
2. 然后执行:systemctl daemon-reload
参考:
https://www.programmersought.com/article/95721475597/
vi /etc/ssh/sshd_config
# 禁止 Root 账号登录
PermitRootLogin no
# 版本
Protocol 2
systemctl restart sshd
vi /etc/pam.d/sshd
# 在 auth 部分添加一行
# even_deny_root 表示同样限制 root 账号# file 用于指定统计次数用的文件,默认是 /var/log/tallylog
auth required pam_tally2.so even_deny_root deny=5 unlock_time=300 file=/var/log/tallylog
# 如果不生效,则在 account 部分再添加一行account required pam_tally2.so
vi /etc/profile.d/auto-logout.sh
# 添加一行
readonly TMOUT=300
参考:
https://man7.org/linux/man-pages/man8/pam_tally2.8.html
https://mp.weixin.qq.com/s/IR96o6bgNH0Yzd88AwdLUQ
https://www.tecmint.com/use-pam_tally2-to-lock-and-unlock-ssh-failed-login-attempts/
permit 允许 deny 拒绝 permit 匹配 deny 不匹配