Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

See attached diagram.

  • Host A - Windows server
  • Host B - Linux server
  • Host C - VMWare ESXi server

From host A I can SSH to host B over the VPN tunnel. I can ping host C from host B, but not from host A. I am assuming this is because host C has lost its default gateway.

Host C is a VMWware ESXi server, so I would need to tunnel several ports (80,443,902) in order to reach host C from host A.

What is the correct ssh syntax to create the tunnel in order to reach host C from host A, and can I do it using a single command, or do I need to run three commands (one for each port, 80,443,902)?

Network Diagram

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here's how I accomplished this.

  • Host A - 192.168.10.6
  • Host B - 10.18.3.20
  • Host C - 10.18.3.10

Then these commands:

  • ssh -f -L 10.18.3.20:80:10.18.3.10:80 10.18.3.20 -N
  • ssh -f -L 10.18.3.20:443:10.18.3.10:443 10.18.3.20 -N
  • ssh -f -L 10.18.3.20:902:10.18.3.10:902 10.18.3.20 -N

Then pointed the vSphere client on Host A to 10.18.3.20, which connected me to 10.18.3.10 and I was able to change the default gateway.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.