我的 VPS 上的連接埠 5005 正在偵聽,但已關閉

我的 VPS 上的連接埠 5005 正在偵聽,但已關閉

我有一個程式在連接埠 5005 上運行,該連接埠正在偵聽並可透過 localhost 存取:

znc-admin:~/.znc$ netstat -tulpn | grep 5005
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 0.0.0.0:5005            0.0.0.0:*               LISTEN      25476/znc    

znc-admin:~/.znc$    wget -p http://localhost:5005
--2014-11-26 11:25:21--  http://localhost:5005/
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:5005... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1790 (1.7K) [text/html]
Saving to: `localhost:5005/index.html'

100%[===================================================>] 1,790       --.-K/s   in 0s

2014-11-26 11:25:21 (155 MB/s) - `localhost:5005/index.html' saved [1790/1790]

Loading robots.txt; please ignore errors.
--2014-11-26 11:25:21--  http://localhost:5005/robots.txt
Connecting to localhost (localhost)|127.0.0.1|:5005... connected.
HTTP request sent, awaiting response... 200 OK
Length: 26 [text/plain]
Saving to: `localhost:5005/robots.txt'

100%[===================================================>] 26          --.-K/s   in 0s

2014-11-26 11:25:21 (2.87 MB/s) - `localhost:5005/robots.txt' saved [26/26]

FINISHED --2014-11-26 11:25:21--
Total wall clock time: 0.01s
Downloaded: 2 files, 1.8K in 0s (88.2 MB/s)

不幸的是,從這個連接埠轉送測試網站來看,該連接埠似乎已關閉:http://www.yougetsignal.com/tools/open-ports/

並且頁面http://<my ip>:5005在我的瀏覽器中超時。

這讓我發瘋,我錯過了什麼?

答案1

我感覺這很簡單,但也許這對某人有幫助。我只需要透過我的 AWS 控制台為我的安全群組(即我的防火牆)新增一個例外。

在花了一個小時檢查伺服器的防火牆後,我之前曾多次遇到這種確切的情況。所以我希望這能提醒我自己和其他人檢查其他潛在的「防火牆」!

相關內容