Is it possible to redirect connections to a specific IP/port to an external IP/port?
Server A has the external IP xxx.xxx.xxx.xxx Server B has the external IP yyy.yyy.yyy.yyy
User sends a request to server A on port 25565, I want to redirect it to server B at port 25565 but people who connect to server B must have theirs IP adressess, not IP adress of server A.
This works, but all people who connect has IP adress of server A and I need that they will have their own IP adresses.
iptables -t nat -A PREROUTING -p tcp --dport 25565 -j DNAT --to-destination xxx.xxx.xxx.xxx iptables -t nat -A POSTROUTING -p tcp -d xxx.xxx.xxx.xxx --dport 25565 -j SNAT --to-source yyy.yyy.yyy.yyy