Difference between revisions of "Modbus TCP Port"

From Proview Wiki
Jump to: navigation, search
(Created page with "<p>In a Linux system only root can bind a port < 1024. <br /> As for Modbus TCP the standard port is 502.<br /> In this case you will get the next failure at runtime start-...")
 
 
Line 1: Line 1:
<p>In a Linux system only root can bind a port &lt; 1024. <br /> As for Modbus TCP the standard port is 502.<br /> In this case you will get the next failure at runtime start-up: "Modbus TCP Bind socket failure, retrying...Permission denied"</p>
+
In a Linux system only root can bind a port < 1024. <br />
<p>&nbsp;</p>
+
As for Modbus TCP the standard port is 502.<br />
<p>Change the port to a port number &gt; 1024</p>
+
In this case you will get the next failure at runtime start-up: "Modbus TCP Bind socket failure, retrying...Permission denied"<br />
<p>Or</p>
+
<br />
<p>Set the s-bit on the plc-executable (note: if you rebuild do this again on the new plc-executable)</p>
+
 
<p><br /> If you are running a firewall: The following commands opens this port:</p>
+
* Change the port to a port number > 1024
<p><br /> sudo iptables -A INPUT -p tcp --dport 502 -j ACCEPT<br /> <br /> sudo iptables -A OUTPUT -p tcp --dport 502 -j ACCEPT<br /> <br /></p>
+
or
<p>TBD:</p>
+
* Set the s-bit on the plc-executable (note: if you rebuild do this again on the new plc-executable)
<p>sudo sh -c "iptables-save &gt; /etc/iptables.rules"</p>
+
<br />
 +
If you are running a firewall: The following commands opens this port:<br />
 +
 
 +
 
 +
sudo iptables -A INPUT -p tcp --dport 502 -j ACCEPT<br />
 +
<br />
 +
sudo iptables -A OUTPUT -p tcp --dport 502 -j ACCEPT<br />
 +
<br />
 +
 
 +
TBD:<br />
 +
 
 +
sudo sh -c "iptables-save > /etc/iptables.rules"

Latest revision as of 04:51, 27 August 2013

In a Linux system only root can bind a port < 1024.
As for Modbus TCP the standard port is 502.
In this case you will get the next failure at runtime start-up: "Modbus TCP Bind socket failure, retrying...Permission denied"

  • Change the port to a port number > 1024

or

  • Set the s-bit on the plc-executable (note: if you rebuild do this again on the new plc-executable)


If you are running a firewall: The following commands opens this port:


sudo iptables -A INPUT -p tcp --dport 502 -j ACCEPT

sudo iptables -A OUTPUT -p tcp --dport 502 -j ACCEPT

TBD:

sudo sh -c "iptables-save > /etc/iptables.rules"

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox