File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,15 @@ The modbus registers are mapped to shared memory objects:
39
39
AI | Discrete Input Registers | read-only | <name-prefix>AI
40
40
```
41
41
42
+ ### Use privileged ports
43
+ The standard modbus port (502) can be used only by the root user under linux by default.
44
+ To circumvent this, you can create an entry in the iptables that redirects packets on the standard modbus port to a higher port.
45
+ The following example redirects packets from port 502 (standard modbus port) to port 5020
46
+ ```
47
+ iptables -A PREROUTING -t nat -p tcp --dport 502 -j REDIRECT --to-port 5020
48
+ ```
49
+ The modbus client must be called with the option ``` -p 5020 ```
50
+
42
51
## Libraries
43
52
This application uses the following libraries:
44
53
- cxxopts by jarro2783 (https://github.com/jarro2783/cxxopts )
You can’t perform that action at this time.
0 commit comments