iptables redirect traffic code example
Example: iptables redirect traffic to another ip
iptables -t nat -A PREROUTING -p tcp --dport 3124 -j DNAT --to-destination 1.1.1.1:3000
iptables -t nat -A POSTROUTING -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 3124 -j DNAT --to-destination 1.1.1.1:3000
iptables -t nat -A POSTROUTING -j MASQUERADE