I think you would be better off aiming at making /bin/login (which is a
shell script that calls a Lua, all editable) work from the telnet nc.

The nc in tomsrtbt is busybox nc, which doesn't support the ip address
argument, and honestly, I don't think nc (as I envision it) should be
concerned about listening only from certain IPs.  I'd rather have more
of a real login with a real password prompt.....


-Tom

On Fri, 10 May 2002, Borkuti Peter wrote:

> Date: Fri, 10 May 2002 14:17:01 +0200
> From: Borkuti Peter <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [tomsrtbt] nc host restriction
>
> Hello
>
> I'd like to login remotely in a tomsrtb.
> I can access it with telnet, but it doesn't ask me a password,
> I get a root prompt immediately,
> so I'd like to allow telnet from only _one_ host.
>
> On an other machine, I can restrict nc with the next command:
> nc -l -p 23 -e /home/peter/mybash 192.168.1.100
>
> (in /home/peter/mybash there is a '/bin/bash -i' line)
> The last parameter is the host IP where the telnet connection
> is allowed from.
>
> The promblem is, that it seemed to me, that the version of nc in tomsrtb
> distrib doesn't know this parameter.
>
> The excerpt from my rc.custom.gz:
>
> cat>>inittab<<X
> c7:5:respawn:/usr/bin/nc -l -p 23 -e /usr/bin/telnetd
> X
> kill -HUP 1
>
> It works, but it is open from the whole world.
>
> cat>>inittab<<X
> c7:5:respawn:/usr/bin/nc -l -p 23 -e /usr/bin/telnetd 192.168.1.100
> X
> kill -HUP 1
>
> It makes tomsrtb run in an endless failure, I can get the help
> of the nc command.
>
> How can I access telnet form only one maschine?
>
> Thank you in advance
> --
> Peter Borkuti
>

Reply via email to