Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: VPN if all you have is ssh!



 [hidden email] wrote: 
> I'm sure there are a lot of different ways to accomplish this, but I say, 
> this seems pretty cool to me. 
> 
> Say you work at a company that only allows Microsoft tools (exchange, 
> connectra, etc.), or a mere ssh connection through a gateway. How do you 
> use tools like source control, email, etc.? 
> 
> Well, here's how I did it: 
> 
> Use ssh to the gateway and use the "-L" port forwarding option to forward 
> a local port, say 2022, to port 22 on my machine in the main office. 
> 
> ssh -C -L 2022:mymachine:22 gateway.company.com 
> 
> This opens a compressed and encrypted connection to the gateway, and 
> forwards ssh on my office machine on port 2022. 
> 
> Now, run ssh with the -w option (for a VPN) as: 
> 
> ssh -f -p 2022 -w 0:0 root@localhost "/root/vpn/vpnstartup.sh" 
> 
> # Now initialize tunnel device created by ssh 
> /sbin/ifconfig tun0 


BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org