1856582 Members
12516 Online
104113 Solutions
New Discussion

Re: restricted telnet

 
SOLVED
Go to solution
Rosli Ahmad
Frequent Advisor

restricted telnet

This might sound like a silly question, but I would appreciate if anyone could help me with this.

I have few machines to access to via telnet from a local host.I would like to restrict my telnet session to those selected few only. I want to control the access privilege on my local host as oppose to restricting my connection at the remote machines. I wonder if it is possible to do so.

Regards
Rosli Ahmad
6 REPLIES 6
Robert-Jan Goossens
Honored Contributor

Re: restricted telnet

Hi Rosli,

Take a look at next question/answer(s).

Hope it helps,

Robert-Jan.
Jose Mosquera
Honored Contributor

Re: restricted telnet

Hi,

The "/var/adm/inetd.sec" will be useful to you, in this file you could "allow|deny" totally or partially the "telnet" service as well as other important services, for detailed info pls consult on-line manual:
#man inetd.sec

Rgds.
Robert-Jan Goossens
Honored Contributor

Re: restricted telnet

Rosli Ahmad
Frequent Advisor

Re: restricted telnet

Thank you for the quick reply.

I believe inetd.sec would block or permit connection to my local host (a).

However, my issue is to limit my telnet access to those remote servers (b,c,d...)by controlling the access in my local host (a). In other words, what do I need to configure in (a) so that all its users can only access (b) and not the rest (c,d,e...).

The reason behind all these is because there are too many remote hosts accessible out there once a user is granted access to my local host (a).

Hope that will paint a better picture.

Thank you.
Sorrel G. Jakins
Valued Contributor
Solution

Re: restricted telnet

Just write a script called 'telnet' and inspect the parms being passed. The pass the successful requests to /usr/bin/telnet. Make sure your script directory is higher in the PATH than /usr/bin.

HTH, Sorrel
Randy Tarrier
Advisor

Re: restricted telnet

Hi Rosli,
Following Sorrel's suggestion:
You could use inetd.sec in conjunction with the telnet shell script. Depending on your user groups, you could set up their default profile with an environmental variable TELNET_ALLOW.
Use 0 for no access, 1 for limited, 2 for unlimited. In the telnet.sh script, check this variable - if =1, check the list of 'allowed' hosts in inet.sec (this may not work if you need to allow greater access to your host than just these- then you'd have to create a separte config file for this purpose).

hth,
Randy
Do it as long as you love it!