Description

The message inetd[4468]: /usr/libexec/telnetd[56033]: exited, status 1 appear in the router log file.
Based on the logging level, you may be seeing this message along with:
telnetd[96499]: ttloop: peer died: Resource temporarily unavailable

Symptoms

The message inetd[4468]: /usr/libexec/telnetd[56033]: exited, status 1 appear in the router log file.
Based on the logging level, you may be seeing this message along with "telnetd[96499]: ttloop: peer died: Resource temporarily unavailable"

Solution

This message will be seen if someone is trying to scan the machine for open ports. This is not because of any software defect.

The solution is to identify the external source trying to telnet to one of the IP addresses configured in the router and block it.
This can be achieved by configuring the firewall filters. Below is one of the many ways to identify and block the unwanted incoming telnet sessions.

The filter has to be configured and applied in the Loopback interface to identify the control packets destined to the routing engine.

Steps:

  1. Configure a RE filter like the below.
  2. filter protect-re {
         term tcp-syn {
               from {
                    protocol tcp;
                    tcp-initial;
               }
               then {
                    syslog;
                    accept;
              }
         }
         term default {
               then {
                    log;
                    accept;
                    }
         }
    }
This filter would catch all the incoming TCP sessions destined to any of the interface IP addresses configured in the router. If a match happens, it would make an entry in the syslog file.
  • Configure the syslog file as below.
Lab# show system syslog
file messages {
      any any;
}
file fw-log {
      firewall any;
}

Here the fw-log is the file where the logs from the firewall will be captured
  • Apply the firewall filter to the Loopback interface.
[edit]
Lab# set interfaces lo0 unit 0 family inet filter input protect-re
  • Keep this running for sometime (until the some unwanted incoming TCP sessions are seen in the logs)
  • This requires an extensive checking of the syslog messages to find out which is the needed TCP session and which is not needed.
    telnetd[96499]: ttloop: peer died: Resource temporarily unavailable
    inetd[4468]: /usr/libexec/telnetd[96499]: exited, status 1
    The command show log fw-log can be used to view the syslog information.
    • Identify the source IP address of the device that is making this continuous attempts and figure out the incoming logical interface from the Syslog.
    • Do monitor the packets in the logical interface and verify the packets coming through that interface
    • Trace the source and verify why it is making such attempts.
    • Block the packets from that particular source in the gateway router which is near to that source by applying the firewall filter in the logical interface.
    • Check the router’s log and confirm if the telnetd messages have stopped. If it is not stopped,  fine tune the testing further with the help of the syslog info If needed, perform the above steps more carefully till the messages stops appearing.