1
0
mirror of https://github.com/JoelBender/modpypes synced 2025-10-05 20:45:46 +08:00
modpypes/iptables_redirect.sh
2017-04-25 15:54:52 -04:00

11 lines
262 B
Bash
Executable File

#!/bin/bash
#
# This script maps the privlidged MODBUS port 502 to the non-privlidged
# port 10502 so server applications don't have to run with elevated
# privileges.
#
sudo iptables -t nat -I PREROUTING -p tcp --dport 502 -j REDIRECT --to-ports 10502