Monday, November 25, 2019

升级 FortiGate 固件后打不开 Web 控制台

旧固件版本:5.4.4
新固件版本:5.6.2

1. 进入 CLI
2. 重置 HTTPS server 证书为 "Fortinet_Factory"
config system global
set admin-server-cert "Fortinet_Factory"
next

Thursday, November 21, 2019

VirtualBox "Call to WHvSetupPartition failed"

解决方法:关闭 Hyper-V

管理员权限打开PowerShell,执行以下命令后重启:
bcdedit /set hypervisorlaunchtype off

Monday, November 11, 2019

给 RDP 安装证书

准备工作:

1. 安装 Root CA
2. 安装 Intermediate CA
3. IIS 安装签发好的证书

方法一: (PowerShell)
Open a PowerShell console (Runas administrator) on your RD Session Host. Type/paste the commands below:

This command displays the thumbprint of the certificate, copy it to a text file or something similar:
Get-ChildItem "Cert:\LocalMachine\My"
This is a variable to set the WMI path to the RD Session Host RDP listener (Where the certificate needs to be changed):
$PATH = (Get-WmiObject -class "Win32_TSGeneralSetting" -Namespace root\cimv2\terminalservices)
Finally this is the command to change the active certificate on the RDP listener:
Set-WmiInstance -Path $PATH -argument @{SSLCertificateSHA1Hash="thumbprint"}
The "thumbprint" above, is the value you noted earlier, just insert it between the ".

参考:
https://social.technet.microsoft.com/Forums/en-US/bcedb97f-b86f-485a-a39f-579f947cf367/how-install-ssl-certificate-for-rds-on-windows-server-2016?forum=winserverTS

https://serverfault.com/questions/444286/configure-custom-ssl-certificate-for-rdp-on-windows-server-2012-and-later-in-r


方法二:
wmic /namespace:\\root\cimv2\TerminalServices PATH Win32_TSGeneralSetting Set SSLCertificateSHA1Hash="thumbprint"
参考:
 https://blog.brankovucinec.com/2016/12/06/how-to-install-custom-certificate-on-rdsh-server/

Friday, November 8, 2019

理解 Cisco ACL Vlan 的 in 和 out

1.
2.
An access-list applied outbound to a vlan interface filters traffic going TO machines on that vlan.
An access-list applied inbound to a vlan interface filters traffic coming FROM machines on that vlan.

总结:

IN 和 OUT 都是相对于交换机而言的


参考:
https://community.cisco.com/t5/switching/acl-direction-when-applied-to-a-vlan-on-a-switch/td-p/1423652 

Tuesday, February 19, 2019

Hyper-V 里 AD 作为 NTP server 小坑

源为 "VM IC Time Synchronization Provider" 并且无法修改


解决方法:
在 Hyper-V 的设定中关闭 “Time synchronization”



另外注意 Hyper-V 的时间是否正常:
Hyper-V 默认开启“Time synchronization” 源为 "VM IC Time Synchronization Provider",说明 AD server 的时间源是 Hyper-V,只需要保证 Hyper-V 的时间是准确的,关闭 “Time synchronization” 不是很有必要性。
推荐:外部时间源 -- Hyper-V -- AD -- Others

参考:
https://mikefrobbins.com/2010/05/17/active-directory-and-server-time-synchronization-problems-with-hyper-v/


Wednesday, February 13, 2019

Windows 10 离线安装 .NET Framework 3.5

1. 准备 Windows 10 的安装光盘 / ISO 镜像

2. 打开 cmd.exe, 执行命令( x: 为驱动器盘符)
DISM /Online /Enable-Feature /FeatureName:NetFx3 /All /LimitAccess /Source:x:\sources\sxs

x:\sources\sxs 中起作用的是以下两个文件,也可复制出来并修改上述命令的相应路径
microsoft-windows-netfx3-ondemand-package~31bf3856ad364e35~amd64~~.cab
Microsoft-Windows-NetFx3-OnDemand-Package~31bf3856ad364e35~amd64~en-US~.cab
(以上 Windows 10 是英文版)
 注意: 这两个文件必须跟安装系统的ISO文件里的一样,否则会报错

参考:
https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/deploy-net-framework-35-by-using-deployment-image-servicing-and-management--dism
(页面最底部)

Sunday, January 13, 2019

Linux 开机启动服务

开机启动服务:
chkconfig --add test
chkconfig test on

查看开启的服务列表:
chkconfig --list

参考:https://www.thegeekstuff.com/2011/06/chkconfig-examples/
 

ACL的permit和deny两种含义

 permit 允许    deny 拒绝  permit 匹配    deny 不匹配