Re: Can "pppd" bind to a pty with "telnet" session over ethernet? - PPP

This is a discussion on Re: Can "pppd" bind to a pty with "telnet" session over ethernet? - PPP ; Does "pppd" have to be binded to a serial device? This is what I am trying to do. I only have an shell account to a Solaris machine. The only way to get to the Solaris machine is via telnet ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Re: Can "pppd" bind to a pty with "telnet" session over ethernet?

  1. Re: Can "pppd" bind to a pty with "telnet" session over ethernet?

    Does "pppd" have to be binded to a serial device? This is what I
    am trying to do. I only have an shell account to a Solaris machine.
    The only way to get to the Solaris machine is via telnet to a gateway
    then telnet to this Solaris machine. This happens through the
    existing ethernet LAN. I want to run "slirp" at the Solaris machine
    (my final destination) then start up the ppp interface at my Linux.
    I am trying to create a tunnel/bridge over this telnet session. Can
    this be accomplished over this mechanism? Do I need to use something
    else? Could someone give me other suggestion/pointer?

    This is what I have done:

    +---------+
    | Linux | +------------+ +---------+
    | with |_______| Gateway to |________| Solaris |
    | telnet | eth | Solaris | eth | w/Slirp |
    | session | +------------+ +---------+
    +---------+

    When I started "pppd" in Linux, it does not seem to be communicating
    via the telnet session. I can see the non-printable characters to
    the terminal window of my telnet session. "pppd" also did not tell
    me that I am using an invalid device.

    # pppd -detach /dev/pts/10 9600 noproxyarp noauth \
    10.0.2.15:172.16.32.28 debug
    Using interface ppp0
    Connect: ppp0 <--> /dev/pts/10
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    sent [LCP ConfReq id=0x1 ]
    LCP: timeout sending Config-Requests
    Connection terminated.

    Do I need something to do the redirection? It almost looks like the
    LCP were sent to my terminal screen instead of redirecting to the
    other end of the telnet session. I can not use the pty option of
    "pppd" since the pty option expects an automated script to complete.
    I cannot automate the authentication of the telnet sessions. What I
    need is an interactive terminal session which allows me to do manual
    login and startup of slirp at the remote end.

    Does anyone know whether I am allowed to do this at all? Did I use
    the wrong/missed tool? Any idea how I can move on? All suggestions
    are welcome. Thanks.

  2. Re: Can "pppd" bind to a pty with "telnet" session over ethernet?

    alyung@lucent.com (Alex Yung) writes:
    > # pppd -detach /dev/pts/10 9600 noproxyarp noauth \
    > 10.0.2.15:172.16.32.28 debug


    You should have better luck if you run telnet as a child of pppd.
    Something like this:

    # pppd noauth updetach debug pty 'telnet -8E gateway-machine' \
    connect 'chat ogin: name word: password ... % pppd' 10.0.2.15:172.16.32.28

    > Do I need something to do the redirection? It almost looks like the
    > LCP were sent to my terminal screen instead of redirecting to the
    > other end of the telnet session.


    The LCP messages were sent over the pty you gave. I have no idea what
    that pty was connected to.

    > I can not use the pty option of
    > "pppd" since the pty option expects an automated script to complete.
    > I cannot automate the authentication of the telnet sessions.


    Why?

    --
    James Carlson, Solaris Networking
    Sun Microsystems / 1 Network Drive 71.234W Vox +1 781 442 2084
    MS UBUR02-212 / Burlington MA 01803-2757 42.497N Fax +1 781 442 1677

  3. Re: Can "pppd" bind to a pty with "telnet" session over ethernet?

    Alex Yung wrote:
    > Does "pppd" have to be binded to a serial device? This is what I
    > am trying to do. I only have an shell account to a Solaris machine.
    > The only way to get to the Solaris machine is via telnet to a gateway
    > then telnet to this Solaris machine. This happens through the
    > existing ethernet LAN. I want to run "slirp" at the Solaris machine
    > (my final destination) then start up the ppp interface at my Linux.


    This appears to mean that you telnet directly to your account on the
    (non-gateway) Solaris box. If that's not the case then you needn't
    read further.

    > I am trying to create a tunnel/bridge over this telnet session. Can
    > this be accomplished over this mechanism? Do I need to use something
    > else? Could someone give me other suggestion/pointer?


    You should understand that slirp development seems to be at a
    standstill, the documentation is, IMHO, poor, and that I've never
    used slirp. So the following is only a little better than a WAG.

    This is what I would begin the discovery process with:

    pppd 9600 192.168.2.1:192.168.2.2 -detach default-asyncmap debug \
    pty 'telnet -8E 192.168.1.2' \
    connect 'chat -v "ogin: " USERNAME "sword: " PASSWORD \\$ \
    "stty -echo;slirp -b 9600 ppp"

    Substitute the Solaris shell prompt for the "$" and the LAN IP address
    of the Solaris box for 192.168.1.2. When the IPCP negotiations finish
    and you can ping 192.168.2.2 from the Linux box then you'll know that
    you succeeded. BTW, the `slirp -b 9600 ppp' command above is based on
    the one found at

    http://theory.uwinnipeg.ca/localfile...p/slirppp.html

    by a google search, but simplified so that hopefully it has a better
    chance establishing a PPP link over the telnet connection.

    It's very likely to take some experimenting to get it to work, and
    there's no guarantee that it's even the right approach.

    Good Luck.

    > This is what I have done:


    > +---------+
    > | Linux | +------------+ +---------+
    > | with |_______| Gateway to |________| Solaris |
    > | telnet | eth | Solaris | eth | w/Slirp |
    > | session | +------------+ +---------+
    > +---------+


    > When I started "pppd" in Linux, it does not seem to be communicating
    > via the telnet session. I can see the non-printable characters to
    > the terminal window of my telnet session. "pppd" also did not tell
    > me that I am using an invalid device.


    > # pppd -detach /dev/pts/10 9600 noproxyarp noauth \
    > 10.0.2.15:172.16.32.28 debug
    > Using interface ppp0
    > Connect: ppp0 <--> /dev/pts/10
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > sent [LCP ConfReq id=0x1 ]
    > LCP: timeout sending Config-Requests
    > Connection terminated.


    > Do I need something to do the redirection? It almost looks like the
    > LCP were sent to my terminal screen instead of redirecting to the
    > other end of the telnet session. I can not use the pty option of
    > "pppd" since the pty option expects an automated script to complete.
    > I cannot automate the authentication of the telnet sessions. What I
    > need is an interactive terminal session which allows me to do manual
    > login and startup of slirp at the remote end.


    > Does anyone know whether I am allowed to do this at all? Did I use
    > the wrong/missed tool? Any idea how I can move on? All suggestions
    > are welcome. Thanks.


    --
    Clifford Kite Email: "echo xvgr_yvahk-ccc@ri1.arg|rot13"
    PPP-Q&A links, downloads: http://ckite.no-ip.net/
    /* All the world's a net! And all the data in it merely packets
    come to store-and-forward in the queues a while and then are
    heard no more. 'Tis a network waiting to be switched!
    -Vint Cerf, RFC 1121 */

+ Reply to Thread