Results 1 to 2 of 2

Thread: Port Forwarding to router (ssh, custom ports)

  1. #1

    Port Forwarding to router (ssh, custom ports)

    Hi!

    I would like to forward the ssh (port 22) and the port 11280 to my router! So i added in the WebInterface the ports 22 and port 11280 to route to 192.168.0.1 (router ip).

    When i take a look at the iptables -l -t nat it has these lines:

    DNAT tcp -- anywhere anywhere tcp dpt:8029 to:192.168.0.1:80
    DNAT tcp -- anywhere anywhere tcp dpt:ssh to:192.168.0.1:22
    DNAT udp -- anywhere anywhere udp dpt:ssh to:192.168.0.1:22
    DNAT tcp -- anywhere anywhere tcp dpt:11280 to:192.168.0.1:11280
    DNAT udp -- anywhere anywhere udp dpt:11280 to:192.168.0.1:11280
    DNAT tcp -- anywhere anywhere tcp dpt:telnet to:192.168.0.1:23
    The WebRemote Interface works (port 8029 to port 80 on router). I can connect to the webinterface from the internet! But not with ssh or with the port 11280 (i have a program running listening on port 11280). Telnet also dont works! But the ftp works.. But i never say, that i want to forward the 21 port to WAN (but the ftp is ok for me).

    So what is the problem? The WebInterface works correctly, but no other ports are forwarded to my router

  2. #2
    I found the solution!

    The problem was that iptables blocks the ports to the router himself!

    Removing the drop rules adding my custom rules (like ftp and www - which are inserted by the firmware) and adding the drop rule again!

    Looks like this:

    # Adding to iptables - cause of routing table, just port www/ftp is routed to asus router
    # removing to drop any paket
    iptables -D INPUT -j DROP
    # Adding all tcp ports open for asus - should not be used because of security pr
    # iptables -A INPUT -j ACCEPT --destination asus
    # Adding custom ports to open for asus
    # telnet access via port 23
    # iptables -A INPUT -j ACCEPT -p tcp --dport 23 --destination asus
    # ssh access via port 22
    iptables -A INPUT -j ACCEPT -p tcp --dport 22 --destination asus
    # MirtaLoader access via port XXX80
    iptables -A INPUT -j ACCEPT -p tcp --dport XXX80 --destination asus
    # Adding again to block any paket which is not in rule
    iptables -A INPUT -j DROP
    In german i have a better explanation why you have to do this.
    http://wl500g.info/showthread.php?t=10512
    If you dont speak german and you have the same problem, just PM me!

Similar Threads

  1. Replies: 3
    Last Post: 01-11-2014, 14:16
  2. Replies: 0
    Last Post: 24-01-2007, 03:54
  3. Problems with port forwarding
    By User007 in forum WL-500g Q&A
    Replies: 0
    Last Post: 04-08-2006, 17:53
  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, 01:03
  5. Need help with Wl500g and port forwarding
    By ikir in forum WL-500g Q&A
    Replies: 0
    Last Post: 28-01-2006, 14:58

Posting Permissions

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