Reverse Telnet and NAT?

Discussion in 'Cisco' started by rfield, Feb 22, 2005.

  1. rfield

    rfield Guest

    I'm having trouble figuring out why this doesn't work...

    I have setup reverse telnet from RouterA's AUX port (line 65) to
    RouterB's CON port. I created a loopback interface (loop99), address
    172.24.1.1 /32 on Router A, added a static route to that address with a
    32 bit mask in the routing table of the rest of the companies routers,
    pointing to the ethernet interface of RouterA. I can type

    telnet 172.24.1.1 2065

    from any host and everything works great.

    Now, perhaps I'm overthinking this, but couldn't I create a NAT with
    another loopback interface to avoid typing in the port number? I got
    rid of the route to 172.24.1.1 /32, added a route to 172.24.2.0 /24. I
    created a second loopback interface (loop98) with the address
    172.24.2.1 255.255.255.0. Now I cannot use the previous telnet
    command, but I can use

    telnet 172.24.2.1 2065

    and again, everything works great.

    Now I want to map 172.24.2.2 port 23 to 172.24.1.1 port 2065. Here's
    the config that should matter, from RouterA...

    -----------------------------
    interface loopback99
    description First loopback address, not accessable from the LAN
    ip address 172.24.1.1 255.255.255.255
    ip nat inside
    !
    interface loopback98
    description Second loopback interface, accessable from the LAN
    ip address 172.24.2.1 255.255.255.0
    ip nat outside
    !
    ip nat inside source static tcp 172.24.1.1 2065 172.24.2.2 23
    extendable
    -----------------------------

    Is what I'm trying to do impossible, or am I messing up the NAT? Am I
    screwing up somewhere else?

    thanks for any help...
     
    rfield, Feb 22, 2005
    #1
    1. Advertisements

  2. rfield

    Merv Guest

    what is the root problem/issue that you are trying to address ???
     
    Merv, Feb 22, 2005
    #2
    1. Advertisements

  3. rfield

    rfield Guest

    Sorry, that would be nice to know, eh?

    I cannot telnet to 172.24.2.2 (port 23 by default).
     
    rfield, Feb 22, 2005
    #3
  4. rfield

    Merv Guest

    That is not what I meant.

    You appear to be looking for a way to do reverse telnet wihtout
    entering the port number.

    Q1. will you usually initiate the session from within the router?

    If so:

    ip host REVERSE 2065 172.24.1.1
    alias exec RT REVERSE

    then just type RT at the CLI prompt


    Q2. or will you usally inititating the reverse telnet session from
    a device external to the router ?

    If so most telnet program allow you to store session information and
    you can inlcude the telnet port number.. An example is VanDykes CRT
    program
     
    Merv, Feb 22, 2005
    #4
  5. rfield

    rfield Guest

    I will not be initiating the session from within the router, the
    session(s) will be initiated from a variety of programs, some of which
    are older and do not allow for the entering of port numbers.

    A majority of the connections will not be to Cisco equimpent either, I
    am just using another router for testing the application and the NAT.
    I am testing this out with an AUX-CON connection before spending the
    money on a NM-16A or NM-32A.

    So yes, I am looking for a way to do reverse telnet without entering
    the port number. Exactly.
     
    rfield, Feb 22, 2005
    #5
  6. rfield

    Merv Guest

    Merv, Feb 22, 2005
    #6
  7. Now, perhaps I'm overthinking this, but couldn't I create a NAT with
    What you are looking for is not NAT but the "ip alias" command.

    ip alias 172.24.2.2 2065

    where 174.24.2.x is any random address that you pick on a subnet serviced by
    that router.

    Then, telnetting to 172.24.2.2 port 23 will be like connecting to the router
    address 172.24.2.1 port 2065.

    The arp table of the telnetting host will see the mac address of the router
    for both IP addresses.
     
    Phillip Remaker, Feb 24, 2005
    #7
  8. rfield

    rfield Guest


    Bingo. Works like a charm!
     
    rfield, Feb 24, 2005
    #8
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.