9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] looking for advice for network setup
@ 2011-08-11 20:38 Roman Salmin
  2011-08-11 21:39 ` Anthony Sorace
  0 siblings, 1 reply; 5+ messages in thread
From: Roman Salmin @ 2011-08-11 20:38 UTC (permalink / raw)
  To: 9fans

[-- Attachment #1: Type: text/plain, Size: 1066 bytes --]

   Hello,

 I have plan9 machine in my home network that is NATed to providers VPN.

 Other machine at work is running cpu server with real IP.

 I can connect from home to work, but I don't know any way to connect
otherwise direction.

 Can I configure this machines to be able access home data from work?
(connected to
 work cpu server be able to edit file which is at home.)

 If I am rightly understand, I can't do this directly because any namespace
that will be created
 by dialing from home to work will be inaccessibly to other terminals
connected to work cpu server.

 So I need some server on work cpu server that on dialing from home will do
necessary network mounting,
  and then listen for connection from other terminals to provide them with
updated namespace, is it?
  Does such thing exists?

 I am quite new in plan9, so please enlighten me.

P.S. plan9 actually runs at kvm at linux machines, with bridge network
setup. So I can
organise VPN in linux to solve this problem globally. But question about
plan9 solution.

[-- Attachment #2: Type: text/html, Size: 1136 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] looking for advice for network setup
  2011-08-11 20:38 [9fans] looking for advice for network setup Roman Salmin
@ 2011-08-11 21:39 ` Anthony Sorace
  2011-08-12 13:50   ` Roman Salmin
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Sorace @ 2011-08-11 21:39 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 1228 bytes --]

i'm not 100% clear on what you're after, but when i had a similar setup, i
wanted to be able to get at my home (NATed) data from work. to do so, i
have a script called postroot [1] which, when cpu'd into a server posts the
root of the calling terminal as foo.root, where foo is the calling terminal. i
could then "mount /srv/foo.root /n/foo" or similar to get at my home box.

it was occasionally useful to be able to use the home network connection
from outside, too. for that, i have a script called tun[2] which mounts the
network connection from a named root (previously posted with postroot)
and connects using that.

there's no special server needed; this is all using the standard tools. i'm
not clear what you mean about giving terminals an updated namespace.

you could stick an entry in cron on the NATed system that calls postroot
on the real-world server. in that case postroot ought to do a bit more
error checking and probably try the existing connection before removing
and replacing it.

the structure, and possibly the actual scripts (i don't remember) came
from someone in #plan9, possibly maht.

[1]	/n/sources/contrib/anothy/bin/rc/postroot
[2]	/n/sources/contrib/anothy/bin/rc/tun


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 210 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] looking for advice for network setup
  2011-08-11 21:39 ` Anthony Sorace
@ 2011-08-12 13:50   ` Roman Salmin
  2011-08-12 15:55     ` Anthony Sorace
  0 siblings, 1 reply; 5+ messages in thread
From: Roman Salmin @ 2011-08-12 13:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

>
> [1]     /n/sources/contrib/anothy/bin/rc/postroot
> [2]     /n/sources/contrib/anothy/bin/rc/tun
>
>
Thank you. That is really helps. I learned about srv(3) and now understand
mine misconception.
I tested it all at work from NATed kvm and it all works. But I have problem
when tried postroot from home network.

 From home terminal(highthills) I cpu to work cpu server and run postroot on
it. Then at work I login to
same cpu server from work terminal. Then:
  cpu% 9fs /srv/rsalmin.highthills.postrot /n/rsalmin.highthills.postroot
  cpu% cd /n/rsalmin.highthills.postroot
  cpu% ls
  ls: .: clone failed

What it may be? A connection lose?

[-- Attachment #2: Type: text/html, Size: 916 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] looking for advice for network setup
  2011-08-12 13:50   ` Roman Salmin
@ 2011-08-12 15:55     ` Anthony Sorace
  2011-08-12 18:27       ` Steve Simon
  0 siblings, 1 reply; 5+ messages in thread
From: Anthony Sorace @ 2011-08-12 15:55 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

[-- Attachment #1: Type: text/plain, Size: 466 bytes --]

> What it may be? A connection lose?

that'd be my first guess. it is, unfortunately, not uncommon for
routers which do NAT (and some corporate firewalls) to close
idle connections on you. i used to have a cron script that
ran on the NATed system, cpu'd in, did the postroot, and then
hung around running "date" every once in a while, which was
sufficient to keep the connection open. i've lost that script, but
it shouldn't be hard to reproduce.

anth


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 210 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [9fans] looking for advice for network setup
  2011-08-12 15:55     ` Anthony Sorace
@ 2011-08-12 18:27       ` Steve Simon
  0 siblings, 0 replies; 5+ messages in thread
From: Steve Simon @ 2011-08-12 18:27 UTC (permalink / raw)
  To: 9fans

this is my script to do this, runs on the machine behind the firewall (larch)
and connects to the default file server.

#!/bin/rc

while(){
	cpu -c 'rm -f  /srv/larch ;
		 srvfs larch /mnt/term ;
		while() sleep 600 '>[2] /dev/null
	sleep 6
}




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-12 18:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-11 20:38 [9fans] looking for advice for network setup Roman Salmin
2011-08-11 21:39 ` Anthony Sorace
2011-08-12 13:50   ` Roman Salmin
2011-08-12 15:55     ` Anthony Sorace
2011-08-12 18:27       ` Steve Simon

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).