雲服務器開啟很多不必要的端口,造成安全隱患
TCP
25端口:郵件服務
systemctl stop postfix
53端口 :域名解析服務
systemctl stop rhel-domainname
111端口:SUN公司的RPC服務所有端口
systemctl stop rpcbind
systemctl stop rpcbind.socket
systemctl stop rpcbind.target
631端口:打印服務
systemctl stop cups
UDP
5353端口:多播DNS(multicastDNS)/DNS-SD網絡服務
systemctl stop avahi-daemon
systemctl stop avahi-daemon.socket
查看端口命令:
grep 端口號 /etc/services|head
一鍵停止禁用:
ss -ntlp systemctl stop rhel-domainname systemctl stop cups systemctl stop rpcbind systemctl stop rpcbind.socket systemctl stop rpcbind.target systemctl stop dnsmasq systemctl stop postfix systemctl stop avahi-daemon
systemctl stop avahi-daemon.socket
ifconfig virbr0 down
brctl delbr virbr0 systemctl disable rpcbind systemctl disable rpcbind.socket systemctl disable rpcbind.target systemctl disable cups systemctl disable dnsmasq systemctl disable rhel-domainname systemctl disable postfix
systemctl disable avahi-daemon
systemctl disable avahi-daemon.socket
systemctl disable libvirtd
ss -ntlp
exit