New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Forward a port to an external ip
Hey guys
I have a VPS in hong kong with shitty peering to France where my backend server is based (read: 2000+ ms ping). I also have a digitalocean vps in germany with good peering (200ms).
I'd like to somehow use that as a proxy, preferably with as little as possible extra software running on the DO box.
So my question is: Is it possible to have iptables do this for me?
Basically I want my DO vps (ip 1.1.1.1) to proxy traffic from my HK vps (2.2.2.2) to my backend server (3.3.3.3) running mysql on a non-default port (port 1234).
I've tried a bunch of stuff, which I will not list here due to the possibility I tried it incorrectly.
Comments
Have you tried something like:
Will forward TCP data coming from 2.2.2.2 on port 4321 of your DO VPS (1.1.1.1) to port 1234 of your backend (3.3.3.3).
Even this should work as droplets are KVM:
This works indeed. I think I forgot to disable the firewall of the DO server earlier.
Any idea how to make ufw play nicely alongside this?