4
【centos】防火墙做端口转发
source link: https://holydogs.github.io/2022/10/08/%E3%80%90centos%E3%80%91%E9%98%B2%E7%81%AB%E5%A2%99%E5%81%9A%E7%AB%AF%E5%8F%A3%E8%BD%AC%E5%8F%91/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
top查看内存(可以free -m)、cpu(多核按1)占用情况
防火墙可以直接做端口转发
查看状态
systemctl status firewalld.service
启动防火墙
systemctl start firewalld.service
开启转发
firewall-cmd --add-forward-port=port=1122:proto=tcp:toport=22:toaddr=192.168.5.4 --permanent
firewall-cmd --reload
firewall-cmd --list-all
放开端口
firewall-cmd --zone=public --add-port=1122/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-all
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK