Results 1 to 4 of 4

Thread: Why can't I get telnet working over serial?

  1. #1
    Join Date
    Jun 2011
    Posts
    3

    Why can't I get telnet working over serial?

    I have a series 2, TCD24004A, with version 9.3 software that was given to me. I have put a 7.2.2-oth-K1 kernel on it after using killhdinitrd on the kernel. I was able to get a serial console working and now I am trying to get pppd and a telnet prompt. It appears that I have pppd working because I can ping the TiVo. But when I try to telnet to it I get

    telnet 192.168.1.101 23
    trying 192.168.1.101 ...

    and nothing more. The only hint about what is going wrong is in the logs when pppd starts it complains that it cannot change write permissions of ttyS2 since the disk is mounted ro.

    Here is my rc.sysinit.author

    Code:
    #!/bin/bash
    if test -x /etc/startpppd && [ $pppondss = 'true' ]
    then
      echo "running startpppd in rc.sysinit.author"
      /etc/startpppd &
    else
       if test -x /etc/spawnbash
       then
         echo "running spawnbash in rc.sysinit.author"
         /etc/spawnbash &
       fi
    fi
    
    # killpppd sleeps for a while, then launches spawnbash
    /etc/killpppd &
    
    
    if [ -f /var/hack/etc/hacks_callfromrc.sysinit ]; then
      . /var/hack/etc/hacks_callfromrc.sysinit
    fi
    Here is startpppd script

    Code:
    #!/bin/sh
    
    #/sbin/pppd
    if /sbin/mypppd /dev/ttyS2 file \
         /etc/ppp-options.ttyS2 \
         nodetach 
    then
      echo "pppd started on /dev/ttyS2"
      echo "starting tnlited in startppd"
      #tnlited 23 /bin/bash -login &
    else
      echo "pppd failed on /dev/ttyS2, running spawnbash"
      /etc/spawnbash &
    fi
    The line to start tnlited is commented out because something in the TiVo startup process starts it.

    The killpppd script is my attempt to revert to the bash prompt after a delay

    Code:
    #!/bin/sh
    # Wait, then kill pppd and start spawnbash
    sleep 300
    /var/hack/bin/killall pppd
    /var/hack/bin/killall spawnbash #just in case
    /etc/spawnbash &
    This is how I start pppd on my linux machine
    Code:
    /usr/sbin/pppd /dev/ttyS0 115200 noauth local nocrtscts xonxoff lcp-echo-failure 2 lcp-echo-interval 60 192.168.1.2:192.168.1.101 &
    Here is ppp-options

    Code:
    115200	
    crtscts
    #debug
    #kdebug 1
    asyncmap 0
    netmask 255.255.255.0
    defaultroute
    nodetach
    nodeflate
    and here is ppp-options.ttyS2

    Code:
    #/dev/ttyS2
    115200
    nocrtscts
    lcp-restart 1
    ipcp-restart 1
    #lcp-echo-failure 2
    #lcp-echo-interval 60
    #debug
    local
    noauth
    passive
    persist
    nodetach
    #kdebug 1
    asyncmap 0
    proxyarp
    nodefaultroute
    #xonxoff
    netmask 255.255.255.0
    #connect "/etc/chat.ttyS2"
    The commented lines in ppp-options.ttyS2 are detritus from the my various attempts.

    Thanks for any help you may be able to give me.

  2. #2
    Join Date
    Jun 2011
    Posts
    3
    Update: I have found that netfilters are running. I can turn them off using

    Code:
    /etc/netfilters-disable
    and I have successfully done this from a bash prompt. However, I have yet to get a telnet prompt when starting pppd during boot. I think that for some reason I am not able to turn off the netfilters from a boot script.

    My plan now is to try to add iptables rules that will allow telnet and ftp through ppp.

  3. #3
    Join Date
    Mar 2005
    Posts
    235
    Not sure about (my)pppd, but here are the relevant lines from my rc.sysinit.author file:
    Code:
    #!/bin/bash
    
    # bash shell on telnet
    /sbin/tnlited 23 /bin/bash -login > /dev/console &
    
    # bash shell on the serial port (115200,N,8,1)
    /bin/stty 115200 sane < /dev/ttyS2
    /bin/bash -login </dev/ttyS2 &> /dev/ttyS2&
    Also, I think you may need to neuter iptables. Rename /sbin/iptables and replace it with this:
    Code:
    #!/bin/bash
    exit 0

  4. #4
    Join Date
    Jun 2011
    Posts
    3
    I give up. I have added filters to open the telnet and ftp ports, but still I can only get access through ppp on serial if I first start a bash prompt on serial and start pppd manually. But I have a script that makes it easy, so I will just do it that way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •