9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] tcp wrapping
@ 1998-08-29  5:01 arisawa
  0 siblings, 0 replies; only message in thread
From: arisawa @ 1998-08-29  5:01 UTC (permalink / raw)


Hello 9fans!

Tcp_wrapper is one of the neat tools in the UNIX world.
Our Plan9 has no special tools to wrap connections.
Instead we can do more elegantly using general tool, i.e., "rc".
----------- tcp23 ---------
#!/bin/rc
ifs=! r=`{cat $3/remote}
remote=$r(1)
if(~ $remote 202.250.160.* 202.16.124.*)
	exec /bin/aux/telnetd
echo service refused
-------------------------

How can we wrap ftp?
Probably you will want to allow anonymouse access to world wide,
and you will want to disallow user access except a few IPs.
This is possible if we have '-U' option for ftp; the option that disallow
user access.
Then tcp21 will be:
----------- tcp21 ---------
#!/bin/rc
ifs=! r=`{cat $3/remote}
remote=$r(1)
if(~ $remote 202.250.160.* 202.16.124.*)
	exec /bin/aux/ftp -n/lib/namespace.ftp $*
exec /bin/aux/ftp -U -n/lib/namespace.ftp $*
-------------------------

Adding the option '-U' to ftp.c is a vary easy task.

Kenji Arisawa
E-mail: arisawa@aichi-u.ac.jp




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

only message in thread, other threads:[~1998-08-29  5:01 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-08-29  5:01 [9fans] tcp wrapping arisawa

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