9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] vpn without ipsec nor ssl
@ 2005-07-06  4:23 geoff
  0 siblings, 0 replies; only message in thread
From: geoff @ 2005-07-06  4:23 UTC (permalink / raw)
  To: 9fans

If your company's firewalls are awkward to get through because of
inadequate documentation, the complexity of ipsec, or windows-only VPN
clients, you can roll your own VPN (as long as the firewalls permit
arbitrary outgoing connections).  This may be obvious to some, but
perhaps not all.

Put up a Plan 9 CPU server inside the company and add these two
scripts to /rc/bin on your home file server:

; cat /bin/posttermnet 
#!/bin/rc
# posttermnet - post the terminal's /net
rfork e
svc=net.$user.office
if (test -e /srv/$svc) {
	echo $0: /srv/$svc already exists >[1=2]
	exit 'srv exists'
}
rfork s
exec srvfs $svc /mnt/term/net

; cat /bin/mntoffnet
#!/bin/rc
# mntoffnet - mount the office /net
rfork e
srv=/srv/net.$user.office
if (! test -e $srv) {
	if (test -e /env/cpu)
		import -a $cpu /srv
	if (! test -e $srv) {
		echo $0: no $srv here nor on $cpu >[1=2]
		exit 'no srv'
	}
}
exec mount -b $srv /net

At the office, connect to your local cpu server and run

	cpu -h your-home-cpu-server
	posttermnet

This creates an encrypted cpu connection to your home cpu server and
posts /mnt/term/net (the office cpu server's /net) as
/srv/net.$user.office.

Once home, you can then run

	mntoffnet

on a terminal or cpu server and get your office cpu server's /net on
top of your own /net.  You can then ssh, cpu or sam -r to machines at
the office.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-07-06  4:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-06  4:23 [9fans] vpn without ipsec nor ssl geoff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).