After setting port for SoftPLC communication (for connections from IDE, Vision, etc.) in the soft_plc.config file, the connection will not work on the new port. This happens because the MiniPLC is protected by a firewall that has, among other things, port 12345 enabled, but not the newly set port number. To change the firewall settings open file /etc/iptables.rules, in which we will find
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [4962:573959]
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp –dport 12345 -j ACCEPT
-A INPUT -m state –state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -m icmp –icmp-type 8 -j ACCEPT
-A INPUT -p tcp -m tcp –dport 22 -j ACCEPT
-A INPUT -j DROP
Change the value in bold to the new port number, save the file and restart the PLC.
Note: Mainly do not change the value 22; it is for access via the terminal, then it would be "closed from the outside" and the MiniPLC would have to be configured via the serial terminal using the internal COM port and the TTL-RS232 converter, eg domat M070.