linux關閉X服務

2021-10-21 20:46:41 字數 842 閱讀 8960

檢測到遠端x服務正在執行中

1:漏洞掃瞄出現x服務,需要關閉該服務,奈何找不到關閉方案

本文說兩種關閉x服務的方案:

方案1:通過防火牆禁用6000埠

適用於redhat7.x  linux7.x  centos7.x

#啟動防火牆

systemctl start firewalld

#開啟6000埠

firewall-cmd --zone=public --add-port=6000/tcp –permanent

#移除6000埠

firewall-cmd --zone=public --remove-port=6000/tcp --permanent

#重啟防火牆

firewall-cmd --reload

#檢視已開放的埠

firewall-cmd --list-ports

方案2:kill掉x服務,禁用x服務的指令碼監聽

檢視系統對外開放的埠

netstat –tunlp

kill -9 監聽6000埠的pid

type -a startx

vim /bin/startx

vim /usr/bin/startx

將指令碼中的

serverargs=「」替換為

serverargs=「-nolisten tcp」

linux關閉服務

輸入ntsysv 命令把不需要的服務前面的 去掉,然後重啟 linux 伺服器。具體哪些服務是必須啟動的 服務建議表 服務名稱 功能簡介 建議 crond 系統的定時任務,一般的 linux 伺服器都需要定時任務來協助系統維護。建議開啟 開啟 httpd apache 服務的守護程序。如果需要啟動 ...

linux關閉sendmail服務

方法一 a.root sample etc rc.d init.d sendmail stop 關閉sendmail服務 或者 root sample service sendmail stop 關閉sendmail服務 shutting down sendmail ok shutting down...

關閉linux的sendmail服務

linux 系統啟動的時候總是在 sendmail 服務這停止較長的時間,遠遠超過了我可以忍耐的時間 chkconfig命令 root linux1 chkconfig list sendmail sendmail 0 off 1 off 2 on 3 on 4 on 5 on 6 off 可以看到...