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!



 As an aside, I was thinking about doing exactly this earlier today. 

On Sun, Jun 01, 2008 at 11:51:29AM -0400, [hidden email] wrote: 
> 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 
> # Now assign it an ip address on your local network 
> /sbin/ifconfig tun0 192.168.2.10 
> # Now add a route for it 
> /sbin/route add -net 192.168.1.0 netmask 255.255.255.0 tun0 
> 
> On the remote machine, you'll create a script called "startvpn.sh" 
> /sbin/ifconfig tun0 
> /sbin/ifconfig tun0 192.168.1.99 
> /sbin/route add -net 192.168.2.0 netmask 255.255.255.0 tun0 
> 
> This assumes your local network is 192.168.2.0, and your work network is 
> 192.168.1.0. You probably should parameterize the scripts to make them 
> more flexible. 


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