Subject: Re: echo-like replacement for telnetd
To: henry nelson <netb@irm.nara.kindai.ac.jp>
From: Eric Fox <eric@fox.phoenix.az.us>
List: netbsd-help
Date: 09/18/2002 20:40:41
henry nelson wrote:
>
> On Thu, Sep 19, 2002 at 12:35:37AM +0300, Giorgos Keramidas wrote:
> > following to your hosts.allow file:
> >
> > telnet : 127.0.0.1 : allow
> > telnet : ALL \
> > : severity auth.info \
> > : twist /bin/echo "You are not welcome to use %d from %h."
> >
> > The libwrap support of inetd(8) will take care of the rest :-)
>
> I wasn't able to get enough information from inetd(8) or hosts_access(5)
> to show me what you've done so that I can create something to meet my own
> needs. Specifically, what will %d or %h insert, and how would I enter a
> short paragraph (3-4 lines)?
>
> [For the time being I have inetd run a /bin/sh script to echo 3 lines of
> information. The script is behind tcp wrappers. To overcome the "stair
> casing" effect that I think Andy was refering to, I echo some control
> codes, e.g., '^[[2J^[[3;4f', which positions the cursor. It seems to be
> okay on the telnet clients I've tried.]
>
> Anyway, thanks everyone.
>
> henry nelson
The man pages hosts_access(5) and hosts_options(5) should have
everything you need to know ... for example, the 'banner' directive can
be used for exactly what you're wanting to do.
--
/\---/\ Eric J Fox
/ o o \ http://fox.phoenix.az.us
\.\ /./ ---------------------------
\@/ "Of course it runs NetBSD."
.