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 /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 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 /32, added a route to /24. I
    created a second loopback interface (loop98) with the address Now I cannot use the previous telnet
    command, but I can use

    telnet 2065

    and again, everything works great.

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

    interface loopback99
    description First loopback address, not accessable from the LAN
    ip address
    ip nat inside
    interface loopback98
    description Second loopback interface, accessable from the LAN
    ip address
    ip nat outside
    ip nat inside source static tcp 2065 23

    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. Advertisements

  2. rfield

    Merv Guest

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

  3. rfield

    rfield Guest

    Sorry, that would be nice to know, eh?

    I cannot telnet to (port 23 by default).
    rfield, Feb 22, 2005
  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
    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
    Merv, Feb 22, 2005
  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
  6. rfield

    Merv Guest

    Merv, Feb 22, 2005
  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 2065

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

    Then, telnetting to port 23 will be like connecting to the router
    address 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
  8. rfield

    rfield Guest

    Bingo. Works like a charm!
    rfield, Feb 24, 2005
    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.