The scenario:
- I have a Linux laptop (
linuxlaptop
) - There's a piece of software that I develop that access a web service
https://ws.behind-vpn.com
that is behind a Cisco AnyConnect VPN. - I cannot connect to the VPN from the Linux laptop (the VPN certificate process is Windows/IE only)
Therefore, when doing integration testing, I do the following:
- Start a Windows VM (
windowsvm
) - Connect the VPN from the VM
- Test the software on the VM
- Start a Windows VM (
I am now looking to streamline the integration testing process a bit. I would like to be able to connect to the web service directly from my Linux laptop.
My questions:
- I have a feeling that this should be possible using SSH port forwarding. Is it?
- If possible, could someone explain how to configure ssh port forwarding to accomplish this?
- Do I need a SSH server on
windowsvm
to do this? If so, what is a good SSH server for Windows?
If all you're doing is https (port 443), then yes.
Run sshd on your linux laptop and then connect to it using putty (or other ssh client) from any host within the firewall perimeter. This host needs to have direct access to the site you're testing. It can even be the server itself.
In putty, configure a "Remote" tunnel. Choose a random source port (pick one over 1024 and make sure it's not being used on your laptop) and set the destination to
<YourTestingServerIP>:443
.Once ssh is connected and the tunnel is up, browse to the address
https://localhost:<RandomLocalPort>/blah/blah/blah.html
on your laptop and you should be golden.