Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

my home is Linux servers where SSH can always be used to get around a slightly-too-restrictive firewall. At work however, all of the servers we deal with are Windows based.

I'm needing to connect to a SQL Server 2000 instance running on a Windows 2008 server. The server is behind a firewall that appears to block all incoming ports except for remote desktop. There is suppose to be a VPN, but for some reason it's gone out and judging by how fast we finally got access to remote desktop, it'd probably be a few weeks before we could get an exception placed in the firewall or the a user added to the VPN.

So now I'm looking for a quick solution to get around it. What's the best way to get around it?

Also, the computers we use to connect to the server runs Windows 7. And we have administrator access to the server, but we'd prefer not to install anything permanently

share|improve this question

migrated from serverfault.com Dec 7 '11 at 21:21

This question came from our site for system and network administrators.

    
Hate to say it but I think you are hosed. Remote Desktop won't let you do any kind of cool tunneling. :/ –  NitroxDM Nov 4 '11 at 22:40
    
@Nitro is there an SSH server that runs on Windows 7 that supports tunneling? Because I could run a standalone version of Putty on the server because I know it supports tunneling, I'd just have to do it in reverse maybe? –  Earlz Nov 4 '11 at 22:42
    
I answered below. But I don't know if it will let you go the other way around. That is using putty on the server and running ssh on your box. I haven't tried it but something tells me it won't work. Give it a go anyway and find out. –  NitroxDM Nov 4 '11 at 22:51

2 Answers 2

up vote 5 down vote accepted

What's wrong with using Remote Desktop? What else are you trying to achieve? You say you're coming from a Windows 7 client into a Windows 2008 server and Remote Desktop is available. I don't understand the problem. Remote Desktop Server can be configured to let you choose from different internal servers from your client at home, with the proper voodoo. Your firewall sysadmin would be in control of this.

Vandyke Software has a solid SSH server product for Windows Server. It isn't free but it works. Firewalls aside, you can connect from Putty or any SSH client, and port forward. http://www.vandyke.com/products/vshell/

There's always gotomypc.com or that ilk.

How about this, presuming SSH is allowed outbound:

  1. Run putty.exe on the server as Administrator with REMOTE port forwarding configured as part of a connection profile to your home Linux SSH server. This is the equivalent OpenSSH command if you have that on Win2008 like NitroxDM:

    [root@sqlserver]# ssh -R 5005:127.0.0.1:1433 user@mylinux.athome.com

    From the putty docs:

    You can also forward ports in the other direction: arrange for a particular port number on the server machine to be forwarded back to your PC as a connection to a service on your PC or near it. To do this, just select the ‘Remote’ radio button instead of the ‘Local’ one. The ‘Source port’ box will now specify a port number on the server (note that most servers will not allow you to use port numbers under 1024 for this purpose).

    If you're running Putty as Administrator, that should work in theory. It works from root in Linux, so it seems worth a shot.

  2. Leave that running. Go home and connect from your SQL Console on your Windows 7 laptop to your home Linux box, which we're now treating as your own personal hackerish gotomypc.com server. That Linux box is now listening on TCP port 5005, and connections to that port will forward backwards over Putty to port 1433 (SQL) on Win2008. Configure your SQL tool, or command line, whatever, to connect to mylinux.athome.com:5005 and see what happens.

share|improve this answer
    
Wow that actually sounds like it could work –  Earlz Nov 6 '11 at 16:43
    
@Earlz Did you try it yet? I'm eager to hear how it worked! –  IcarusNM Nov 19 '11 at 4:58
    
How it worked: SSH (with remote(?) forwarding) to my Linux VPS server from the Windows Server with Putty. Then ssh from my work computer to my Linux server with local(?) forwarding. Worked like a charm and completely secure –  Earlz Nov 20 '11 at 20:28
    
Awesome! How about an "accept" checkmark here? –  IcarusNM Nov 20 '11 at 21:53

I use OpenSSH on Windows. But I don't think that will solve your issue. Once you had ssh up and running you couldn't switch to the open firewall port without cutting off Remote Desktop.

Sounds like you will have to wait for the VPN. Or export the data (I'm assuming that is why your are connecting) to a local server.

Good luck.

share|improve this answer
    
Which OpenSSH server? The Cygwin port? –  Earlz Nov 4 '11 at 22:59
    
    
CopSSH, seems to be maintained pretty well. itefix.no/i2/copssh –  Zoredache Nov 4 '11 at 23:44
    
@Zoredache - Good to know. –  NitroxDM Nov 5 '11 at 5:08

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.