Port Forwarding Troubles

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
gusennan
DD-WRT Novice


Joined: 30 Jan 2018
Posts: 1

PostPosted: Sat Feb 03, 2018 14:57    Post subject: Port Forwarding Troubles Reply with quote
I am attempting to forward ssh traffic from the internet to a Linux machine connected by an ethernet cable to my router, but I am missing something in the port forwarding and each connection attempt times out. I configured the port forwarding in the GUI interface. I've gone through this guide's troubleshooting steps, minus the hard reset.

- The test loopback (nc -vz <WAN-IP> 60322) timed-out.
- The port test (nc -vz 192.168.1.101 22) is successful and I am able to connect via SSH to the Linux machine from the LAN.
- The Linux machine does not have a firewall installed.

The troubleshooting guide says to post the iptables output for troubleshooting. Here it is (I replaced the WAN-IP with <WAN-IP>:

Code:

root@dd-wrt:~# iptables -t nat -vnL PREROUTING
Chain PREROUTING (policy ACCEPT 2563 packets, 192K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    1    32 DNAT       icmp --  *      *       0.0.0.0/0            <WAN-IP>        to:192.168.1.1
    1    60 DNAT       tcp  --  *      *       0.0.0.0/0            <WAN-IP>        tcp dpt:60322 to:192.168.1.101:22
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            <WAN-IP>        udp dpt:60322 to:192.168.1.101:22
  400 38851 TRIGGER    0    --  *      *       0.0.0.0/0            <WAN-IP>        TRIGGER type:dnat match:0 relate:0

root@dd-wrt:~# iptables -vnL FORWARD
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination         
 3950  308K ACCEPT     0    --  *      *       0.0.0.0/0            0.0.0.0/0           state RELATED,ESTABLISHED
    0     0 ACCEPT     47   --  *      eth0    192.168.1.0/24       0.0.0.0/0           
    0     0 ACCEPT     tcp  --  *      eth0    192.168.1.0/24       0.0.0.0/0           tcp dpt:1723
  604 33276 lan2wan    0    --  *      *       0.0.0.0/0            0.0.0.0/0           
    7   420 ACCEPT     0    --  br0    br0     0.0.0.0/0            0.0.0.0/0           
    0     0 ACCEPT     udp  --  eth0   *       0.0.0.0/0            224.0.0.0/4         
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.101       tcp dpt:22
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.101       udp dpt:22
    0     0 TRIGGER    0    --  eth0   br0     0.0.0.0/0            0.0.0.0/0           TRIGGER type:in match:0 relate:0
  597 32856 trigger_out  0    --  br0    *       0.0.0.0/0            0.0.0.0/0           
  597 32856 ACCEPT     0    --  br0    *       0.0.0.0/0            0.0.0.0/0           state NEW
    0     0 logdrop    0    --  *      *       0.0.0.0/0            0.0.0.0/0           


Anything ideas about what next steps I might want to take to troubleshoot?

_________________
Router Model: Linksys WRT1900ACv2
Firmware Version: DD-WRT v3.0-r34578 std (01/19/1Cool
Kernel Version: Linux 4.9.77 #94 SMP PREEMPT Fri Jan 19 01:10:01 CET 2018 armv7l
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12885
Location: Netherlands

PostPosted: Sat Feb 03, 2018 15:46    Post subject: Reply with quote
Have a look in the build thread. I think port forwarding and NAT loopback are broken. There is a new build, maybe it is resolved in that.
I am curently testing 34780 (Kong's build)
Port range forwarding seems to work, you could try Port Range Forwarding

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum