Windows關閉危險端口文件是一款防止黑客入侵的Windows文件。關閉危險端口可以讓你的電腦更加安全,最近比特幣勒索病毒出現,讓廣大用戶受驚,有了這軟件可以防止病毒入侵,有需要的用戶可以下載使用。
電腦在Internet上相互通信需要使用TCP/IP協議,根據TCP/IP協議規定,電腦有256×256(65536)個端口,這些端口可分為TCP端口和UDP端口兩種。如果按照端口號劃分,它們又可以分為以下兩大類:
1.係統保留端口(從0到1023)
這些端口不允許你使用,它們都有確切的定義,對應著因特網上常見的一些服務,每一個打開的此類端口,都代表一個係統服務,例如80端口就代表Web服務。21對應著ftp,25對應著SMTP、110對應著POP3等
2.動態端口(從1024到65535)
當你需要與別人通信時,Windows會從1024起,在本機上分配一個動態端口,如果1024端口未關閉,再需要端口時就會分配1025端口供你使用,依此類推。
但是有個別的係統服務會綁定在1024到49151的端口上,例如3389端口(遠程終端服務)。從49152到65535這一段端口,通常沒有捆綁係統服務,允許Windows動態分配給你使用。
如何查看本機開放了哪些端口?
在默認狀態下,Windows會打開很多“服務端口”,如果你想查看本機打開了哪些端口、有哪些電腦正在與本機連接,可以使用以下兩種方法。
1.利用netstat命令
Windows提供了netstat命令,能夠顯示當前的 TCP/IP 網絡連接情況,注意:隻有安裝了TCP/IP協議,才能使用netstat命令。
操作方法:單擊“開始→程序→附件→命令提示符”,進入DOS窗口,輸入命令 netstat -na 回車,於是就會顯示本機連接情況及打開的端口,如圖2。其中Local Address代表本機IP地址和打開的端口號(圖中本機打開了135端口),Foreign Address是遠程計算機IP地址和端口號,State表明當前TCP的連接狀態,圖中LISTENING是監聽狀態,表明本機正在打開135端口監聽,等待遠程電腦的連接。
如果你在DOS窗口中輸入了netstat -nab命令,還將顯示每個連接都是由哪些程序創建的。上圖2中本機在135端口監聽,就是由svchost.exe程序創建的,該程序一共調用了5個組件(WS2_32.dll、RPCRT4.dll、rpcss.dll、svchost.exe、ADVAPI32.dll)來完成創建工作。如果你發現本機打開了可疑的端口,就可以用該命令察看它調用了哪些組件,然後再檢查各組件的創建時間和修改時間,如果發現異常,就可能是中了木馬。
2.使用端口監視類軟件
與netstat命令類似,端口監視類軟件也能查看本機打開了哪些端口,這類軟件非常多,著名的有Tcpview、Port Reporter、綠鷹PC萬能精靈、網絡端口查看器等,推薦你上網時啟動Tcpview,密切監視本機端口連接情況,這樣就能嚴防非法連接,確保自己的網絡安全。
[ sell=1]@echo off
color 1f
title 關閉常見的危險端口
echo.
echo.
echo 本批處理用於啟動XP係統的防火牆並關閉常見的危險端口
echo.
echo 請確認您正在使用的是XP係統 並且未安裝其他防火牆
echo.
echo 以避免與XP係統的防火牆發生衝突
echo.
echo.
echo.
pause
cls
echo 正在啟動防火牆 請稍候…
sc config SharedAccess start= auto》nul
net start SharedAccess》nul
echo 防火牆已經成功啟動
echo.
echo 正在關閉常見的危險端口 請稍候…
echo.
echo 正在關閉135端口 請稍候…
netsh firewall set portopening protocol = ALL port = 135 name = 135 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉137端口 請稍候…
netsh firewall set portopening protocol = ALL port = 137 name = 137 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉138端口 請稍候…
netsh firewall set portopening protocol = ALL port = 138 name = 138 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉139端口 請稍候…
netsh firewall set portopening protocol = ALL port = 139 name = 139 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉445端口 請稍候…
netsh firewall set portopening protocol = ALL port = 445 name = 445 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉593端口 請稍候…
netsh firewall set portopening protocol = TCP port = 593 name = 593 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉1025端口 請稍候…
netsh firewall set portopening protocol = TCP port = 1025 name = 1024 mode = DISABLE scope = ALL profile = ALL
echo 正在關閉3389端口 請稍候…
netsh firewall set portopening protocol = ALL port = 3389 name = 3389 mode = DISABLE scope = ALL profile = ALL
cls
echo.
echo.
echo.
echo常見的危險端口已經關閉
echo.
echo.
echo.
echo.
echoBy: 菹長
echo.
echo.
echo.
echo 按任意鍵退出
pause>nul
76.4M / 03-25
55M / 06-05
237.9M / 04-13
140.5M / 03-06
900.9M / 03-02
96.2M / 07-06
311.2M / 07-06
335M / 07-06
200M / 07-06
413.8M / 07-06
353.9M / 06-05
131.8M / 04-13
230.8M / 03-03
195.6M / 03-03
165.4M / 03-03
45.6M / 09-08
665.2M / 07-06
2.84G / 07-06
93M / 07-06
338.3M / 07-06
1.38G / 07-26
488.3M / 07-16
109.8M / 06-03
142M / 01-08
1.2M / 11-23
548.8M / 04-13
1.6M / 04-13
1.48G / 03-18
646.6M / 03-03
133.7M / 03-03
325.8M / 06-07
60M / 04-29
254M / 04-25
659M / 04-23
1M / 12-26
253.4M / 12-08
253M / 12-08
1.19G / 11-16
110.5M / 04-23
26.7M / 03-16
488.3M / 07-16
248.9M / 12-08
248.9M / 12-08
201.2M / 04-13
100.6M / 03-06
148.9M / 03-06
1.12G / 07-06
1.25G / 07-06
9.48G / 07-06
50KB / 07-06
116.2M / 04-10
1.92G / 04-17
201.5M / 04-13
7.31G / 07-01
94.3M / 07-06
2.48G / 07-06
7.63G / 07-06
1M / 07-06
778.1M / 07-06
509.7M / 07-06
561.8M / 07-11
1.32G / 01-19
72M / 07-06
548.7M / 07-06
1.00G / 07-06
9.13G / 07-06
126.2M / 07-06
72M / 07-06
105.1M / 07-06
132M / 07-06