9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: arisawa@ar.aichi-u.ac.jp arisawa@ar.aichi-u.ac.jp
Subject: [9fans] tcp wrapping
Date: Sat, 29 Aug 1998 01:01:55 -0400	[thread overview]
Message-ID: <19980829050155.Y24SYoPWTqkQGX-Iuk__BPSp_KJKFUvWyHDO5hRuMTc@z> (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




                 reply	other threads:[~1998-08-29  5:01 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=19980829050155.Y24SYoPWTqkQGX-Iuk__BPSp_KJKFUvWyHDO5hRuMTc@z \
    --to=arisawa@ar.aichi-u.ac.jp \
    /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).