Is it possible to redirect connections to a specific IP/port to an external IP/port?
Example:
Problem solved:
sysctl net.ipv4.ip_forward=1
iptables -t nat -A PREROUTING -p tcp --dport port -j DNAT --to-destination ip:port
iptables -t nat -A POSTROUTING -j MASQUERADE
Where ip and port are the target server I want to redirect the current server port to.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments