#!/bin/bash # echo "prerouting port 205 to port 2182" sudo -n iptables -A PREROUTING -t nat -i eth2 -p tcp --dport 502 -j REDIRECT --to-port 2182