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.
Connect server France from vps Singapore
mrlongshen
Member
in Help
I have server A, I have VPS B,
I want all traffic from custom port at server A will redirect to my VPS B
How to make my vps B connect to my server A ?
VPN ?
and how client can connect to vps B?
Comments
Sounds like a fitting job for a proxy? Try something simple like Caddy for the start.
Using TCP/IP is an option.
Redirect with a 301/302 http status?
Witchcraft.
The answer of your question is hidden in your 2nd sentence. And nothing else matters.
You could make a dstnat rule in iptables to redirect the traffic.
@dahartigan
Can show some?
Are you setting this up to get better routing?
Any other method?
Yeah. True. Since vps to vps connection much faster. So i can reduce the latency. Imagine 1gbps connect with 1gbps. Sure fast. Hehe. I dont mind using my singapore traffic. I got 1tera traffic.
I think a SSH reverse proxy is what you're wanting here. Someone connects to server A on a port, and it will tunnel from server A to server B (using their network) via SSH to server B's port.
Does that sound right?
How ya? I believe like freeorange method.
ssh -nNT -R PORT:VPSA:PORT VPS2
Example
ssh -nNT -R 1111:11.22.33.44:2222 44.33.22.11
That would mean you go to 11.22.33.44:1111 and it would tunnel to 44.33.22.11:2222
Where should I do this ?
https://www.techrepublic.com/article/setting-up-a-reverse-ssh-tunnel/
Cannot. I try this. connection refused.
my vps have port 22 ssh
my dedicated have port 33 ssh
I recommend you to use very powerful tool socat. For example if your server has ip 10.100.0.1 and your vps has 10.200.0.1 and you want to access server's ssh service via vps, run this command on vps:
socat TCP4-LISTEN:2222,fork,su=nobody TCP4:10.100.0.1:22
Now you can connect to 10.200.0.1:2222 and socat will proxify your traffic to 10.100.0.1:22