SSH to a server using VPN at University - ehMac.ca
Facebook
Twitter
YouTube
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
Old Aug 27th, 2012, 08:22 PM   #1
Honourable Citizen
 
cap10subtext's Avatar
 
Join Date: Oct 2005
Location: Toronto
Posts: 2,537
SSH to a server using VPN at University

This isn't Mac specific but same rules apply if I was connecting with Mac or PC.

I've got a linux server set up at a static IP and the IT department at the University I'm working with said the only way to SSH into the server from off campus was to connect the static IP to a VPN account.

Launched the VPN client, then tried to ssh into the server. The connection timed out. I tested the setup 100 different ways and could SSH into it without an issue but couldn't test it over VPN (for reasons beyond my control).

This is the first time I've ever done this when I don't have physical access to the server so I'm trying to cover all my bases here and figure out what is going wrong. If I'm connecting to the server using SSH from from a remote computer using their VPN client, is there something that needs to be changed on the server config? I'm having a lot of trouble finding information that isn't just about how to create an SSH tunnel as a substitute for VPN which is not at all what I'm trying to do.
__________________
cap10subtext is offline   Reply With Quote
Sponsored Links
Advertisement
 
Old Aug 29th, 2012, 02:17 AM   #2
Full Citizen
 
smashedbanana's Avatar
 
Join Date: Sep 2006
Location: Ottawa
Posts: 232
Are you connecting to a VPN and then SSHing to the local IP of the Linux server?
__________________
Macbook Pro 13" i7 2.8GHZ 8GB 500GB | Macbook Black 2.4GHZ 4GB 250GB w/ Invisibleshield | AEBS Gigabit | iPhone 4GS | iPod Nano 3rd Gen 4gb
smashedbanana is offline   Reply With Quote
Old Aug 29th, 2012, 06:56 AM   #3
Honourable Citizen
 
cap10subtext's Avatar
 
Join Date: Oct 2005
Location: Toronto
Posts: 2,537
Yes.
__________________
cap10subtext is offline   Reply With Quote
Old Aug 29th, 2012, 11:25 PM   #4
sudo rm -rf /
 
steviewhy's Avatar
 
Join Date: Oct 2010
Posts: 534
sudo rm -rf /

Last edited by steviewhy; May 17th, 2013 at 01:39 PM.
steviewhy is offline   Reply With Quote
Old Aug 30th, 2012, 08:07 AM   #5
Honourable Citizen
 
cap10subtext's Avatar
 
Join Date: Oct 2005
Location: Toronto
Posts: 2,537
Okay so this is where I feel like I'm missing something. Maybe it's just the way I'm interpreting what you've written but unless I'm mistaken that setting would make it so that be default something like ssh to an IP goes over the VPN connection. But you've said that the Linux server needs to know where the request is coming from. Obviously the two machines need to be on the same network but then is there something I haven't changed in the sshd_config file on the Linux server that isn't active by default? I was under the impression that, for example, AllowTunneling was only for tunneling through SSH tunnels to another machine. Thought there'd be some documentation on it that would be similar to what i'm trying but googling it has proven elusive.
__________________
cap10subtext is offline   Reply With Quote
Old Aug 30th, 2012, 12:02 PM   #6
Get off my lawn!
 
John Clay's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 5,068
This should be working by default, and it's something I do several times every day.

The biggest issue I've encountered is when your local IP subnet is the same as the VPN server's - or when the server you're connecting to via SSH is on a different subnet from the VPN server, but still on the same network. If that's the case, then the VPN server needs to be configured to treat that subnet as local. Otherwise, your computer will try to connect via non-VPN WAN/LAN connection.
__________________
iMac 27" 3.4GHz Core i7, 20GB RAM, 256GB SSD, 1TB HDD • 27" LED Cinema Display
MacBook Pro 13" 2.8GHz Core i7, 16GB RAM, 120GB SSD
iPhone 5 32GB • iPad 2 WiFi + 3G 64GB
Mac mini 2.3GHz Core i5, 16GB RAM, 128GB SSD (XBMC)
Synology DS1512+ NAS • DX513 Expansion • 20TB
John Clay is offline   Reply With Quote
Old Aug 30th, 2012, 12:38 PM   #7
Honourable Citizen
 
cap10subtext's Avatar
 
Join Date: Oct 2005
Location: Toronto
Posts: 2,537
Quote:
Originally Posted by John Clay View Post
This should be working by default, and it's something I do several times every day.

The biggest issue I've encountered is when your local IP subnet is the same as the VPN server's - or when the server you're connecting to via SSH is on a different subnet from the VPN server, but still on the same network. If that's the case, then the VPN server needs to be configured to treat that subnet as local. Otherwise, your computer will try to connect via non-VPN WAN/LAN connection.
Thanks for the replies everyone.

It's starting to seem clearer to me that it should work already and something's gone wrong with the installation or that IT has either not added the device correctly or that they've failed to convey the proper setup information to me (wrong IP, port, etc...).

I guess I'll just have to wait and hear back from them...
__________________
cap10subtext is offline   Reply With Quote
Old Aug 31st, 2012, 12:45 PM   #8
Full Citizen
 
Join Date: Jun 2006
Location: The Hammer
Posts: 208
You might also want to check the ACLs (access control lists) on both the Linux box as well as any firewalls on the university side. You would need to make sure the Linux server is going to allow connections from the IP subnet of the VPN.

Also check that the VPN group your account is in is going to allow SSH. I know some of our VPN groups only allow RDP (port 3389) to a dozen servers, nothing else.

BReligion
__________________
"Hell hath no fury, like a woman scorned for Sega. " - Brodie Bruce :: Mallrats ::

:: Macbook Pro 13.3" 2.66 Core 2 Duo
:: Macbook 13.3" 2.0 Core 2 Duo (the wife's)
:: iMac 17" 1.83 Core Duo
:: iBook 12" 1.33ghz (retired)
:: iPhone 4 & iPhone 2G (8GB retired); iPod 5th Gen (80GB)
:: Apple TV - 160GB, Apple TV2, Airport Exteme & Airport Express
BReligion is offline   Reply With Quote
Old Sep 10th, 2012, 11:47 PM   #9
Honourable Citizen
 
cap10subtext's Avatar
 
Join Date: Oct 2005
Location: Toronto
Posts: 2,537
So, here's a good one. The IT department, of the university which shall remain nameless, reported back on the issue. The support ticket said, "machine is now plugged in and turned on."

Oh Lordy, it hurts the brain...
__________________
cap10subtext is offline   Reply With Quote
Old Sep 11th, 2012, 08:08 AM   #10
Get off my lawn!
 
John Clay's Avatar
 
Join Date: Jun 2006
Location: Toronto
Posts: 5,068
Quote:
Originally Posted by cap10subtext View Post
So, here's a good one. The IT department, of the university which shall remain nameless, reported back on the issue. The support ticket said, "machine is now plugged in and turned on."

Oh Lordy, it hurts the brain...
Wow.
Attached Images
File Type: gif banghead.gif (904 Bytes, 15 views)
__________________
iMac 27" 3.4GHz Core i7, 20GB RAM, 256GB SSD, 1TB HDD • 27" LED Cinema Display
MacBook Pro 13" 2.8GHz Core i7, 16GB RAM, 120GB SSD
iPhone 5 32GB • iPad 2 WiFi + 3G 64GB
Mac mini 2.3GHz Core i5, 16GB RAM, 128GB SSD (XBMC)
Synology DS1512+ NAS • DX513 Expansion • 20TB
John Clay is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FileMaker Go Released Oakbridge All iOS - iPhone, iPad, iPod touch, Apple TV & iTunes 43 Jul 29th, 2010 05:31 PM
Snow Leopard Server == not so good mguertin Anything Mac 4 Jan 23rd, 2010 04:38 PM
Mac OS X Server: How do I Relay outgoing mail to gmail using ssl on port 587? madgunde Mac, iPhone, iPad and iPod Help & Troubleshooting 6 Feb 16th, 2008 04:10 PM
Hyper strange and incredibly frustrating Server crashes - I'm stumped! Troutmagnet Mac, iPhone, iPad and iPod Help & Troubleshooting 2 Apr 25th, 2006 12:08 PM
OS X Server Experiences? How difficult is it to admin? jdurston Anything Mac 1 Oct 26th, 2005 01:26 PM


All times are GMT -4. The time now is 03:17 AM.



Copyright © 1999 - 2012, ehMac.ca All rights reserved. ehMac is not affiliated with Apple Inc. Mac, iPod, iTunes, iPhone, Apple TV are trademarks of Apple Inc. Content Relevant URLs by vBSEO 3.6.0 RC 2

Tribe.ca: Urban living in Toronto!