VNC Server 端口开防火墙命令 NOTES
netsh advfirewall firewall add rule name="VNC Server" dir=in program="C:\Program Files\RealVNC\VNC Server\vncserver.exe" security=authenticate action=allow
cmd命令行配置windows防火墙 Windows
0x01 常用命令
查看当前防火墙状态:netsh advfirewall show allprofiles
关闭防火墙:netsh advfirewall set allprofiles state off
开启防火墙:netsh advfirewall set allprofiles state on
恢复初始防火墙设置:netsh advfirewal...
python间隔两个字符串插入一个字符 Python
import re
subject = '080045000106309140003F2F7D100A01'
if (len(subject) % 2) == 0:
result = re.sub(r"(?<=\w)(?=(?:\w\w)+$)", "-", subject)
elif (len(subject) % 2) != 0:
...
python获取计算机MAC地址 Python
def get_mac():
macList = list(net_if_addrs().items())
macI = 0
macAll = ""
while True:
try:
macName = macList
macAdders = macList
...
mysql8开启远程访问(适用于docker/k8s) MySQL
0x01 开启mysql远程访问
如果存在 Host='%' 的记录 → 允许所有IP远程访问
如果只有 Host='具体IP' → 仅允许特定IP访问
如果无结果 → 禁止远程访问
mysql> SELECT User, Host FROM mysql.user WHERE Host != 'localhost';
+------+------+
|...
VMware VMX格式转换成OVF模版 VMware
VMware Workstation 7.0以上版本中有自带一个OVFTool.exe的工具
在VM安装路径下的\VMware\VMware OVF Tool\ovftool.exe
cmd运行以下命令即可转换成ovf
C:\Program Files\VMware\VMware OVF Tool\ovftool.exe "原文件路径\xxx.vmx...
华为交换机 nat配置 Huawei
出口nat
acl 2000
rule permit source 10.1.0.0 0.0.255.255
int g 2/0/0
nat outbound 2000
端口映射
当前接口地址 映射到本地
nat server protocol tcp global current-interface 80 inside 10.1.200.10 80
华为交换机ospf配置 Huawei
ospf 1 router-id 1.1.1.1
area 0
network 10.1.200.0 0.0.0.255
network 10.1.10.0 0.0.0.255
network 10.1.20.0 0.0.0.255
network 10.1.30.0 0.0.0.255
network 10.1.40.0 0.0.0.255
network...