9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: geoff@collyer.net
To: 9fans@cse.psu.edu
Subject: [9fans] vpn without ipsec nor ssl
Date: Tue,  5 Jul 2005 21:23:01 -0700	[thread overview]
Message-ID: <39f52c5aab2d541c649e399e0b6368a1@collyer.net> (raw)

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.


                 reply	other threads:[~2005-07-06  4:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=39f52c5aab2d541c649e399e0b6368a1@collyer.net \
    --to=geoff@collyer.net \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).