You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/iot-edge/troubleshoot-iot-edge-for-linux-on-windows-networking.md
+24-14Lines changed: 24 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,15 +84,16 @@ The address resolution could fail for multiple reasons. First, the DNS servers c
84
84
```powershell
85
85
Connect-EflowVm
86
86
```
87
-
1. Ping the DNS server address.
87
+
1. Ping the DNS server address and check the response.
88
88
```bash
89
89
ping <DNS-Server-IP-Address>
90
90
```
91
-
If the server is reachable, you should get a response, and your issue may be related to other DNS server configurations. If there's no response, then you probably have a connection issue to the server.
91
+
>[!TIP]
92
+
> If the server is reachable, you should get a response, and your issue may be related to other DNS server configurations. If there's no response, then you probably have a connection issue to the server.
92
93
93
-
Second, some networking environments will limit the access of the DNS servers to specific allowlist addresses. If so, first make sure that you can access the DNS server from the Windows host OS, and then check with your networking team if you need to add the EFLOW IP address to an allowlist.
94
+
Second, some network environments will limit the access of the DNS servers to specific allowlist addresses. If so, first make sure that you can access the DNS server from the Windows host OS, and then check with your networking team if you need to add the EFLOW IP address to an allowlist.
94
95
95
-
Finally, some networking environment will block public DNS servers, like Google DNS (8.8.8.8 and 8.8.4.4). If so, talk with your networking environment team to define a valid DNS server, and then set it up using the `Set-EflowVmDnsServers` cmdlet.
96
+
Finally, some network environment will block public DNS servers, like Google DNS (_8.8.8.8_ and _8.8.4.4_). If so, talk with your network environment team to define a valid DNS server, and then set it up using the `Set-EflowVmDnsServers` cmdlet.
96
97
97
98
## Check your firewall and port configuration rules
98
99
@@ -106,6 +107,9 @@ The IoT Edge for Linux on Windows is still dependent on the underlying Windows h
106
107
|AMQP|5671|BLOCKED (Default)|OPEN (Default)|<ul> <li>Default communication protocol for IoT Edge. <li> Must be configured to be *Open* if Azure IoT Edge isn't configured for other supported protocols or AMQP is the desired communication protocol.<li>5672 for AMQP isn't supported by IoT Edge.<li>Block this port when Azure IoT Edge uses a different IoT Hub supported protocol.<li>Incoming (Inbound) connections should be blocked.</ul></ul>|
107
108
|HTTPS|443|BLOCKED (Default)|OPEN (Default)|<ul> <li>Configure *Outgoing (Outbound)* to be *Open* on port 443 for IoT Edge provisioning. This configuration is required when using manual scripts or Azure IoT Device Provisioning Service (DPS). <li><a id="anchortext">*Incoming (Inbound)* connection</a> should be *Open* only for specific scenarios: <ul> <li> If you have a transparent gateway with leaf devices that may send method requests. In this case, port 443 doesn't need to be open to external networks to connect to IoT Hub or provide IoT Hub services through Azure IoT Edge. Thus the incoming rule could be restricted to only open *Incoming (Inbound)* from the internal network. <li> For *client to device (C2D)* scenarios.</ul><li>80 for HTTP isn't supported by IoT Edge.<li>If non-HTTP protocols (for example, AMQP or MQTT) can't be configured in the enterprise; the messages can be sent over WebSockets. Port 443 will be used for WebSocket communication in that case.</ul>|
108
109
110
+
>[!NOTE]
111
+
> If you are using an external virtual switch, make sure to add the appropriate firewall rules for the module port mappings you're using inside the EFLOW virtual machine.
112
+
109
113
For more information about EFLOW VM firewall, see [IoT Edge for Linux on Windows Security](./iot-edge-for-linux-on-windows-security.md). To check the EFLOW virtual machine rules, use the following steps:
110
114
111
115
1. Start an elevated _PowerShell_ session using **Run as Administrator**.
@@ -118,10 +122,7 @@ For more information about EFLOW VM firewall, see [IoT Edge for Linux on Windows
118
122
sudo iptables -L
119
123
```
120
124
121
-
>[!NOTE]
122
-
> If you are using an external virtual switch, make sure to add the appropriate firewall rules for the module port mappings you're using inside the EFLOW virtual machine.
123
-
124
-
To add a firewall rule to the EFLOW VM, you can check the [EFLOW Util - Firewall Rules](https://github.com/Azure/iotedge-eflow/tree/eflow-usbip/eflow-util/firewall-rules) sample PowerShell cmdlets. Also, you can use the following steps:
125
+
To add a firewall rule to the EFLOW VM, you can use the [EFLOW Util - Firewall Rules](https://github.com/Azure/iotedge-eflow/tree/eflow-usbip/eflow-util/firewall-rules) sample PowerShell cmdlets. Also, you can achieve the same rules creation by following these steps:
125
126
126
127
1. Start an elevated _PowerShell_ session using **Run as Administrator**.
127
128
1. Connect to the EFLOW virtual machine
@@ -141,11 +142,16 @@ To add a firewall rule to the EFLOW VM, you can check the [EFLOW Util - Firewall
141
142
142
143
There are multiple other reasons why network communication could fail. The following section will just list a couple of issues that users have encountered in the past.
By default ICMP ping traffic response is disabled on the EFLOW VM firewall. To respond to ping requests, allow the ICMP traffic by using the following PowerShell cmdlet:
146
-
`Invoke-EflowVmCommand "sudo iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT"`
147
-
- Failed device discovery using multicast traffic.
148
+
149
+
`Invoke-EflowVmCommand "sudo iptables -A INPUT -p icmp --icmp-type 8 -s 0/0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT"`
150
+
151
+
- **Failed device discovery using multicast traffic.**
152
+
148
153
First, to allow device discovery via multicast, the Hyper-V VM must be configured to use an external switch. Second, the IoT Edge custom module must be configured to use the host network via the container create options:
154
+
149
155
```json
150
156
{
151
157
"HostConfig": {
@@ -158,17 +164,21 @@ There are multiple other reasons why network communication could fail. The follo
158
164
}
159
165
}
160
166
```
161
-
- Firewall rules added, but traffic still not able to reach the IoT Edge module.
167
+
- **Firewall rules added, but traffic still not able to reach the IoT Edge module.**
168
+
162
169
If communication is still not working after addling the appropriate firewall rules, try completely disabling the firewall to troubleshoot.
170
+
163
171
```bash
164
172
sudo iptables -F
165
173
sudo iptables -X
166
174
sudo iptables -P INPUT ACCEPT
167
175
sudo iptables -P OUTPUT ACCEPT
168
176
sudo iptables -P FORWARD ACCEPT
169
177
```
170
-
Once finished, reboot the VM to get the EFLOW VM firewall back to normal state.
171
-
- Can't connect to internet when using multiple NICs.
178
+
Once finished, reboot the VM (`Stop-EflowVm` and `Start-EflowVm`) to get the EFLOW VM firewall back to normal state.
179
+
180
+
- **Can't connect to internet when using multiple NICs.**
181
+
172
182
Generally, this issue is related to a routing problem. Check [How to configure Azure IoT Edge for Linux on Windows Industrial IoT & DMZ configuration](how-to-configure-iot-edge-for-linux-on-windows-iiot-dmz.md) to set up a static route.
0 commit comments