CentOS 8系统出来很久了,但是还是没有去熟悉它,今天就抽了点时间玩了下,但是系统装好后发现默认监听了个5355端口就网上搜了搜
[[email protected]_Node-172_30_19_184 ~]# ss -tnlp State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:10050 0.0.0.0:* users:(("zabbix_agentd",pid=769,fd=4),("zabbix_agentd",pid=768,fd=4),("zabbix_agentd",pid=767,fd=4),("zabbix_agentd",pid=766,fd=4),("zabbix_agentd",pid=765,fd=4),("zabbix_agentd",pid=755,fd=4)) LISTEN 0 128 0.0.0.0:9090 0.0.0.0:* users:(("systemd",pid=1,fd=45)) LISTEN 0 128 0.0.0.0:5355 0.0.0.0:* users:(("systemd-resolve",pid=3817,fd=13)) LISTEN 0 128 0.0.0.0:22992 0.0.0.0:* users:(("sshd",pid=708,fd=7)) LISTEN 0 128 0.0.0.0:22 0.0.0.0:* users:(("sshd",pid=708,fd=5)) [[email protected]_Node-172_30_19_184 ~]#
systemd-resolve的主要作用是,利用 systemd-resolved.service系统服务解析主机名、IP地址、域名、DNS资源记录、服务。
默认情况下,参数列表将被视为域名/主机名的列表,程序的输出将是它们所对应的 IPv4 或 IPv6 地址。
如果参数符合 IPv4 或 IPv6 格式,那么表示反解析IP地址所对应的主机名。
关闭端口也很简单。停掉服务关闭自启动
[[email protected]_Node-172_30_19_184 ~]# systemctl stop systemd-resolved.service && systemctl disable systemd-resolved.service
或者修改配置文件
[[email protected]_Node-172_30_19_184 ~]# sed -ri 's/^(#)?LLMNR.*/LLMNR=yes/' /etc/systemd/resolved.conf && systemctl restart systemd-resolved.service [[email protected]_Node-172_30_19_184 ~]# ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:10050 0.0.0.0:* LISTEN 0 128 0.0.0.0:9090 0.0.0.0:* LISTEN 0 128 0.0.0.0:5355 0.0.0.0:* LISTEN 0 128 0.0.0.0:22992 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* [[email protected]_Node-172_30_19_184 ~]# sed -ri 's/^(#)?LLMNR.*/LLMNR=no/' /etc/systemd/resolved.conf && systemctl restart systemd-resolved.service && ss -tnl State Recv-Q Send-Q Local Address:Port Peer Address:Port LISTEN 0 128 0.0.0.0:10050 0.0.0.0:* LISTEN 0 128 0.0.0.0:9090 0.0.0.0:* LISTEN 0 128 0.0.0.0:22992 0.0.0.0:* LISTEN 0 128 0.0.0.0:22 0.0.0.0:* [[email protected]_Node-172_30_19_184 ~]#
您可以选择一种方式赞助本站
支付宝扫一扫赞助
微信钱包扫描赞助
赏