Results 1 to 7 of 7

Thread: telnet/ssh to router from internet

  1. #1

    telnet/ssh to router from internet

    hi all,

    i have a PPoE connection, and i'm using a DDNS Service to map the current IP address to a name. (bxxx.gotdns.org)

    the remote port for access from WAN is set to 6969. Accessing from WAN http://bxxx.gotdns.org:6969 i get to router interface.

    I want to be able to telnet or ssh to router.
    (from LAN telnet works)
    eg: telenet 192.168.10.254 , then it request user & pass and everything is OK

    from WAN, nothing happens.

    I have on router a modified firmware (Olegs ... with busybox 1.13), and i've installed dropbear, so ssh is enabled and functional, only from LAN (like telnet);

    It can be done what i want ?

  2. #2
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    Add the following line to /usr/local/post-firewall to enable ssh access from WAN:

    iptables -A INPUT -p tcp --syn --dport 22 -j ACCEPT

    Don't enable telnet on WAN, it's not secure method.

  3. #3
    This wont enable it! Because you APPEND this rule (with A)!

    But one rule before is "DROP all -- anywhere anywhere"

    And after this line every other package is throwin away (ignored)

    http://wl500g.info/showthread.php?t=7314

    Here is it explained how to use iptables!
    After the line: "Put this in your post-firewall script, but do not forget to change 192.168.1.1 to match your wl500's LAN "
    You can see, he drops the DROP all rule! Then add his custom rules (in your case just one) and then adding again the DROP all rule!

  4. #4
    Had same issue before. ICMP (incoming Pings from WAN) is disabled by the firewall. Check the web interface. If not work, try to disable the firewall, to know, where the mistake is.

  5. #5
    Quote Originally Posted by al37919 View Post
    Add the following line to /usr/local/post-firewall to enable ssh access from WAN:

    iptables -A INPUT -p tcp --syn --dport 22 -j ACCEPT

    Don't enable telnet on WAN, it's not secure method.
    okay, thanks,
    i managed to put together files in post-firewall, just another stupid question
    may i comment even in post-firewall a line by putting in front of it # ?

    (i plan to start learning IPTABLES but i require some testing and i don't want to make something wrong to lock myself out of the box)

  6. #6
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    yeah, # comments the line out. Actually, post-firewall is just a program written in the language, which is called shell.
    Check the result of applying of the rules with iptables -L

  7. #7
    Quote Originally Posted by al37919 View Post
    Add the following line to /usr/local/post-firewall to enable ssh access from WAN:

    iptables -A INPUT -p tcp --syn --dport 22 -j ACCEPT

    Don't enable telnet on WAN, it's not secure method.
    I have these lines working for me with the XWRT firmware, is there any reason they should not work here?


    Code:
    ### Open port to WAN
    ## -- This allows port 22 to be answered by (dropbear on) the router
    # iptables -t nat -A prerouting_wan -p tcp --dport 22 -j ACCEPT
    # iptables        -A input_wan      -p tcp --dport 22 -j ACCEPT

Similar Threads

  1. Kein Ping auf Router über W-lan/kein Internet
    By Tomkin in forum German Discussion - Deutsch (DE)
    Replies: 11
    Last Post: 21-10-2007, 15:22
  2. Can't access router from the internet
    By tmota in forum WL-500gP Q&A
    Replies: 0
    Last Post: 22-05-2007, 21:11
  3. Replies: 0
    Last Post: 24-01-2007, 02:54
  4. Completely new WL700gE router crashed after firmware update - plz help!
    By ClaudeX in forum WL-700g Firmware Discussion
    Replies: 4
    Last Post: 20-07-2006, 00:03
  5. 100mbit Internet connection not working
    By Aresz in forum WL-500g Q&A
    Replies: 8
    Last Post: 27-02-2006, 16:39

Posting Permissions

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