I have 2 servers from 2 different companies
The first server is a VPS where i host my websites (lets say it has IP 220.127.116.11) The second server is a Minecraft server (lets say it has IP 18.104.22.168)
On my VPS i have a domain and subdomain for the minecraft website (lets say its mc.example.com)
If you would go to mc.example.com on your browser, you would end up on 22.214.171.124 and on the website.
What I'm trying to do is, from Minecraft when you go to mc.example.com, you would end up on 126.96.36.199.
So for example:
mc.example.com:80 -> 188.8.131.52:80 mc.example.com:25565 -> 184.108.40.206:25565
Now, my network interfaces are as follows I have two IPs on my VPS, the main one is venet0:0 (220.127.116.11)
This are the network interfaces
auto lo iface lo inet loopback address 127.0.0.1 netmask 255.0.0.0 broadcast 127.255.255.255 up ip route replace 127.0.0.0/8 dev lo # Auto generated venet0 interfaces auto venet0 iface venet0 inet static address 127.0.0.1 netmask 255.255.255.255 broadcast 0.0.0.0 up route add -net 18.104.22.168 netmask 255.255.255.255 dev venet0 up route add default gw 22.214.171.124 auto venet0:0 iface venet0:0 inet static address 126.96.36.199 netmask 255.255.255.255 auto venet0:1 iface venet0:1 inet static address 188.8.131.52 netmask 255.255.255.255
Can someone please tell me what commands i would need to write in iptables in order to proxy that minecraft server from my VPS?