[英]Server on Azure IOT Edge Linux Ubuntu VM - Want to access the device from outside of the VM
[英]Apache not reachable from outside an Azure Ubuntu VM
我剛剛在 Azure 中創建了一個 Linux Ubuntu 14.04 VM。VM 已啟動,我可以通過 SSH 進行連接。
我已經設置了 apache2 並且正在運行。 當我嘗試使用我的公共 IP 從外部訪問時,我的問題就開始了。
我認為 apache 已啟動並正在運行,因為:
1)nmap顯示端口開放:
Starting Nmap 7.01 ( https://nmap.org ) at 2016-10-06 07:42 UTC
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000055s latency).
PORT STATE SERVICE
80/tcp open http
2) curl localhost show something
3) 運行 tcpdump -i eth0 'port 80' 顯示傳入連接
的輸出:
netstat -ntlp
(Not all processes could be identified, non-owned process info
will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:29131 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN -
tcp6 0 0 :::80 :::* LISTEN -
tcp6 0 0 :::22 :::* LISTEN -
但是跑步
ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//'
它只顯示我的私人 ip 和 ipv6。
根據 Azure 的支持人員的說法,我的 VM、網絡安全組、端點和其他東西的設置似乎沒問題。
也許網絡安全組正在拒絕流量。
在 Azure 門戶中,go 到所有資源,然后找到應用於 VM 的網絡安全組。 在 NSG 的概覽頁面上,您將看到管理進出 VM 的流量的規則列表。 是否有允許端口 80 的規則? 如果沒有,請在 NSG 的設置中添加一個新規則。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.