Modbus TCP Port

From Proview Wiki
Jump to: navigation, search

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