Firewall issue with Arduino OTA on Chromebook Crostini?

I have the Arduino IDE 1.8.18 running on Chromebook Crostini and I am able to upload sketches (programs) to an ESP8266 device via USB. I had to use IDE 1.x because 2.x would not install. I think the processor wasn't supported.

Screenshot 2024-07-28 3.22.27 PM

The ESP8266 devices are connected to my home network with a local subnet of 172.16.0.xxx and they are configured for “OTA” programming. Previously this all worked from a Windows laptop in the same environment. The python script seems to run, and authenticates the upload password. Unfortunately it then times out with an error “[ERROR]: No response from device”. Research on using the IDE on other Linux systems suggested that this is likely due to a firewall blocking access, which seems to be a complex issue on the Chromebook, due to the security measures to isolate the Crostini container from the ChromeOS.

I can ping the devices on the 172.16.0.xxx subnet from Crostini without an issue, So I suspect it is the callback from the ESP that is causing the problem.

Some forums suggest successful workarounds on other Linux systems using ufw, so I have tried allowing access to anything in the home subnet, plus a port 100.115.92.xxx on eth0, which I found with ipconfig. I read that this might be the container ipaddress, used to connect Crostini to the Chrome OS. The default host port is (allegedly) 8266. There is also an mDNS service involved, and some say that while the outgoing port is 8266, the reply port is seemingly random.

Status: active
To Action From


22/tcp ALLOW Anywhere
OpenSSH ALLOW Anywhere
Anywhere ALLOW 172.16.0.0/24
100.115.92.0/24 ALLOW 172.16.0.0/24
172.16.0.0/24 ALLOW 100.115.92.0/24
22/tcp (v6) ALLOW Anywhere (v6)
OpenSSH (v6) ALLOW Anywhere (v6)
172.16.0.0/24 ALLOW FWD 172.16.0.0/24

This forum topic suggested using a python command line, but I didn't really understand how to apply it on Crostini.
Regarding "No Response from the Device" problem during OTA update for ESP8266

Unfortunately none of the above seems to work. Anyone have any suggestions on how to fix this? I have a dozen devices around my home these days, and plugging them into the USB port to update them is a pain.

Thanks in anticipation.

Solved: With help from someone on the Crostini topic on Reddit:
Firewall issue with Arduino OTA on Crostini?

The following github link had the answer, along with the Chrome OS port forwarding they suggested.

Manually specify OTA ports in arduino Ide ?

In fact since that github post (in 2016), one of the suggested solutions of putting ota.hostport=8266 in the preferences.txt file and referencing it in the platform.txt file, has already been implemented in the standard IDE code.

So all that was necessary was to go into Chrome OS Settings, search for "Linux Port Forwarding" and add port 8266 for both TCP and UDP (two entries).

I disabled UFW. It wasn't needed.

I hope this helps someone else. I much prefer Chromebook to Windows for managing these ESP8266 devices.

1 Like

Note: These two port forwarding entries are turned off when you restart the Chromebook. This is probably because the Linux container is not automatically started. It does remember the ports (8266), but you have to go back to the Settings and flick the switches each time you power up/restart.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.