Net::Telnet && keeping conections alive 
Author Message
 Net::Telnet && keeping conections alive

I recently upgraded my PSTN line to ADSL. The service is aimed at
windoze users, but I managed to use the connection under
Linux. Connecting to the service is funny :

1. get a DHCP address
2. telnet to a certain host and keep the telnet open (alcatel
DANA server). In this step you don't have to authenticate yet, just
connect to the service and make sure the telnet stays in the foreground.
The server answers 'Session established' and then connection stays open.
If you try to telnet twice it answers 'Only one session allowed'.
3. surf to a webpage to authenticate. This is a very simple page which
POSTS 3 fields to an insecure  http server.

Under Redhat 5.2, the first step is automated on boot. Because I wanted
to be able to use my adsl connection without having to launch a browser
(e.g. automated at boot time), I decided to write my own
authentification client. I managed to automate steps 2 and 3 using
Net::Telnet and libwww's LWP package. After successfull authenfication,
the perl script stays in a while (<>) {} loop to keep the connections

After about 4 minutes all ip traffic stops ... this doesn't happen with
normal unix telnet. I tried to add $TelnetObj->print(''); statements
with 2 minutes intervals to keep the connection alive but this didn't
seem to work. Tcpdump showed the packets going to the  DANA server and
being echoed back again, but my connection dropped anyway after 4

Is there a clean way to keep the telnet connection alive under perl ?

Frederic Vanden Poel

/* Daemon VZW && sys admin && Xs4all ftp2 maintenance -|
|- http://www.*-*-*.com/ ........... ftp://[ftp2|quake] -|

Fri, 24 Aug 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. keeping Telnet alive with Net::Telnet

2. Net::Telnet & Net::Ping

3. Net::Telnet & Local Directors

4. Net::Telnet & file uploading

5. Net::Telnet & Sendmail

6. Net::POP3 && Mail::POP3Client

7. keep getting time out on Net::Telnet->cmd in my perl script

8. LWP::* and Keep-Alive(s)

9. How to keep an FTP session alive?

10. Keeping database connection alive

11. LWP::UserAgent: No Keep-Alive?

12. http "connection: keep-alive" Problem


Powered by phpBB® Forum Software