System Administration

Re: how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value

 
SOLVED
Go to solution
tigerjaz
Occasional Advisor

how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value

how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value?
laomao
4 REPLIES 4
Niel Greeff_1
Advisor
Solution

Re: how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value


The -z value does not set the user timeout value for telnet. It sets the timeout before telnet sends the buffered input to the TCP protocol stack. (This is a buffer timeout value and not a user timeout value)

To set the timeout values for telnet, you have to do it by user.

If you are using kshell or bourne shell
you can use your TMOUT variable to set it.

TMOUT=60
export TMOUT

If you are using c shell
use

set autologout=60
Well, we all try
S.K. Chan
Honored Contributor

Re: how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value

The entry in /etc/inetd.conf would look like this ...

telnet stream tcp nowait root /usr/lbin/telnetd telnetd -z500

The above example sets the BUFFERTIMEOUT value to 500 ticks which is equivalent to 5 seconds. Change the value to your liking. Take note .. no space between "-z" and "500".

Re-read inetd.conf..

# inetd -c
support_5
Super Advisor

Re: how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value

the -z option defines how long to wait for the buffer to be filled, then, when it hits this limit, it sends the packet. usually, this option should be used with the -s option.

eg:
telnet stream tcp nowait root /usr/lbin/telnetd telnetd -s500 -z5

this is recommended by HP (see attachment)

cheers,

- Andy Gray
sven verhaegen
Respected Contributor

Re: how to use ''telnetd -z" in /etc/inetd.conf to set the timeout value

there is lot of info in here already , apart from the buffer timeout and telnet login timeout there is actually within telnet another timout feature that allows user disconnect on idle situations , this means the session timeouts on telnet , this is called the keepalive mechanism , on HP-UX 11 there are two ndd tunable parameters , ndd is a set of tunable parameter

tcp_keep_alive_interval

and

tcp_ip_abort_interval

for the keepalive mechanism. this implies that the client application (telnet agent) reacts to keepalive , it will poll the other side seeing if it is still alive and if not responding will close the connection thus avoiding useless open sessions from users that turned of the PC or Station they where working on without terminating telnet

get more info on the parameters , perform

ndd -h tcp_keep_alive_interval
ndd -h tcp_ip_abort_interval

see the actual values :

ndd -get /dev/tcp tcp_ip_abort_interval
ndd -get /dev/tcp tcp_keep_alive_interval

change the value :


ndd -set /dev/tcp tcp_ip_abort_interval <..>
ndd -set /dev/tcp tcp_keep_alive_interval <..>


...knowing one ignores a greath many things is the first step to wisdom...