<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Blocking UDP ports 1740–1743 and 22350 to disable CODESYS network scan (startup + device discovery)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b9b88de1f4/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b9b88de1f4/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/b9b88de1f4/</id><updated>2026-03-31T12:54:04.273000Z</updated><subtitle>Recent posts to Blocking UDP ports 1740–1743 and 22350 to disable CODESYS network scan (startup + device discovery)</subtitle><entry><title>Blocking UDP ports 1740–1743 and 22350 to disable CODESYS network scan (startup + device discovery)</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/b9b88de1f4/?limit=25#9f14" rel="alternate"/><published>2026-03-31T12:54:04.273000Z</published><updated>2026-03-31T12:54:04.273000Z</updated><author><name>thierry-b</name><uri>https://forge.codesys.com/u/thierry-b/</uri></author><id>https://forge.codesys.com1d9218db24bc5d379d7337c70f45f67bb2faa135</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I am currently investigating the network behavior of CODESYS 3.5 (IDE + Gateway) in environments where the engineering workstation is connected to a very large /16 network.&lt;br/&gt;
In such networks, the automatic device scan performed at IDE startup (and the manual “Scan Network” device discovery) can cause significant delays or freezes, due to the broadcast‑based discovery mechanism.&lt;/p&gt;
&lt;p&gt;After analyzing the traffic with Wireshark, I identified that the IDE uses the following UDP ports:&lt;/p&gt;
&lt;p&gt;1740 – broadcast discovery&lt;/p&gt;
&lt;p&gt;1741 – handshake / responses&lt;/p&gt;
&lt;p&gt;1742 – fallback discovery&lt;/p&gt;
&lt;p&gt;1743 – fallback handshake&lt;/p&gt;
&lt;p&gt;22350 – additional runtime / gateway communication (WAGO, debug, extended discovery)&lt;/p&gt;
&lt;p&gt;To prevent the IDE from scanning the large /16 network, I tested blocking these ports in both directions (IN/OUT) on the network interface connected to the /16 segment (while keeping them open on the OT /24 network interface).&lt;/p&gt;
&lt;p&gt;Result:&lt;/p&gt;
&lt;p&gt;When UDP 1740, 1741, 1742 and 1743 are blocked on the IT interface, the IDE no longer sends any discovery traffic on that interface.&lt;/p&gt;
&lt;p&gt;The IDE still works normally on the OT interface (device discovery, online mode, download, etc.).&lt;/p&gt;
&lt;p&gt;Blocking port 22350 does not seem required to stop the scan, but I included it for completeness.&lt;/p&gt;
&lt;p&gt;My question:&lt;br/&gt;
&lt;strong&gt;=&amp;gt; Can you confirm that blocking UDP ports 1740, 1741, 1742, 1743 (and optionally 22350) on a specific network interface is a valid and supported way to completely disable the CODESYS IDE network scan on that interface (both at startup and during manual device discovery)?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I am not trying to block communication with controllers on the OT network — only to prevent the IDE from scanning the large /16 IT network.&lt;/p&gt;
&lt;p&gt;Any confirmation or additional technical details about the discovery mechanism would be greatly appreciated.&lt;/p&gt;
&lt;p&gt;Thank you.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>