CentOS 8系統出來很久了,但是還是沒有去熟悉它,今天就抽了點時間玩了下,但是系統裝好後發現默認監聽了個5355端口就網上搜了搜

[root@DT_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))                                                                                                                                                                                
[root@DT_Node-172_30_19_184 ~]#

systemd-resolve的主要作用是,利用 systemd-resolved.service系統服務解析主機名、IP地址、域名、DNS資源記錄、服務。

默認情況下,參數列表將被視為域名/主機名的列表,程序的輸出將是它們所對應的 IPv4 或 IPv6 地址。

如果參數符合 IPv4 或 IPv6 格式,那麼表示反解析IP地址所對應的主機名。

關閉端口也很簡單。停掉服務關閉自動啟動

[root@DT_Node-172_30_19_184 ~]# systemctl stop systemd-resolved.service && systemctl disable systemd-resolved.service

或者修改配置文件

[root@DT_Node-172_30_19_184 ~]# sed -ri 's/^(#)?LLMNR.*/LLMNR=yes/' /etc/systemd/resolved.conf && systemctl restart systemd-resolved.service 
[root@DT_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:*                                             
[root@DT_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:*                                             
[root@DT_Node-172_30_19_184 ~]#

文章來源:https://www.dwhd.org/20201124_011430.html

By tony

自由軟體愛好者~喜歡不斷的思考各種問題,有新的事物都會想去學習嘗試 做實驗並熱衷研究 沒有所謂頂天的技術 只有謙虛及不斷的學習 精進專業,本站主要以分享系統及網路相關知識、資源而建立。 Github http://stnet253.github.io

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料