linux回炉第十九天

时间:2023-01-09 10:56:38
windows cmd:  netstat -no | findstr 22
systemctl start firewalld
systemctl status firewalld
yum install -y firewall-config
firewall-cmd --get-all-rules
firewall-cmd --get-all-chains
firewall-cmd --get-default-zone
firewall-cmd --set-default-zone trusted
firewall-cmd --list-services
firewall-cmd --get-services
firewall-cmd --add-service=mysql
firewall-cmd --add-port=8080/tcp
firewall-cmd --permanent --add-rich-rule='rule family=ipv4 source address=192.168.0.0/24 masquerade'
iptables -t nat POSTROUTING -s 192.168.0.0/24 ! -d 192.168.0.0/24 -j MASQUERADE


firewall-cmd --zone-public --add-forward-port=port=9527:proto=tcp:toport=8888:toaddr=11.0.1.58
yum install -y openvpn easy-rsa