My situation is like this, I have Server A which has internet

I have server B which is behind a firewall and can`t connect to the internet but I can access it thru SSH

Then I have server C D E that are in the same network as server B but they can only be accessed from server B thru SSh

I am able to give internet thru ssh tunnel proxy from server A to server B using ssh -R and then connecting back using -D from server B to A to set a port that I can use as proxy.

I kept searching on google for this issue but I couldn`t find my exact situation.

I want to be able to give internet thru one socks5 port to server C D E from server B or A if possible.

How would I go about doing that ? Thank you.


1 Answer 1


On server A, create a SSH connection to B, use B as a jump host to C, open a reverse SOCKS connection:

ssh -J B -R PORT C
  • -J B use B as jump host
  • -R PORT reverse proxy on PORT, requires a recent version of ssh

For details, see the manual.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .