Port forwarding dont work

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Goto page 1, 2  Next
Author Message
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 8:47    Post subject: Port forwarding dont work Reply with quote
Hello,
first of all it was working before, i had reset my router too but no luck
i wanted to open a port 1337 or 7771, 46340 doesnt care which port, all i get in canyouseeme after port forwarding is Connection refused, without port forwarding i get Connection timeout.
The strange thing is before i had reset my ports i have removed the lines from Port Range Forwarding, then the Port was open, how is that possible...anyway this was the reason why i did reset my Router, i thought something is wrong with the settings.
DDNS does works now, this hasnt worked before.
iam using the most recent version 52469. I have disabled the Windows Firewall too.
my router is netgear r9000.
i dont know whats wrong but it was working before, maybe because of an update it didnt work anymore, i dont know.
please help, i need the ports as one is for torrent, now i csnt downloading things and i dont want to use upnp.
I set in Port Range Forward the Ports, i tried too in Port Forwardinng, same result.

thanks!
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 9:15    Post subject: Reply with quote
show screenshots of your port forwarding page

show output of (from command line e.g. telnet/Putty/SSH):
iptables -vnL FORWARD
iptables -vnL -t nat

_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 9:40    Post subject: Reply with quote
Here the output.

Code:

root@DD-WRT:~# iptables -vnL FORWARD
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination               
 3617  788K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0                          state RELATED,ESTABLISHED
   27  1320 DROP       tcp  --  *      vlan2  !80.108.50.31         0.0.0.0/0                          state INVALID
  288 33403 upnp       all  --  *      *       0.0.0.0/0            0.0.0.0/0                 
  288 33403 lan2wan    all  --  *      *       0.0.0.0/0            0.0.0.0/0                 
    0     0 ACCEPT     all  --  br0    br0     0.0.0.0/0            0.0.0.0/0                 
    0     0 ACCEPT     tcp  --  *      vlan2   192.168.1.0/24       0.0.0.0/0                          tcp dpt:1723
    0     0 ACCEPT     47   --  *      vlan2   192.168.1.0/24       0.0.0.0/0                 
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.50                       tcp dpt:555
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.50                       udp dpt:555
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.50                       tcp dpt:9000
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.50                       udp dpt:9000
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.3                        tcp dpt:80
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.3                        udp dpt:80
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.50                       tcp dpt:32400
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.50                       udp dpt:32400
    0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.50                       tcp dpt:222
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.50                       udp dpt:222
  156  8398 ACCEPT     tcp  --  *      *       0.0.0.0/0            192.168.1.27                       tcp dpt:3389
    0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            192.168.1.27                       udp dpt:3389
    3   152 ACCEPT     tcp  --  vlan2  *       0.0.0.0/0            192.168.1.17                       tcp dpt:46340
    0     0 ACCEPT     udp  --  vlan2  *       0.0.0.0/0            192.168.1.17                       udp dpt:46340
    0     0 ACCEPT     tcp  --  vlan2  *       0.0.0.0/0            192.168.1.29                       tcp dpts:7771:7772
    0     0 ACCEPT     udp  --  vlan2  *       0.0.0.0/0            192.168.1.29                       udp dpts:7771:7772
    0     0 TRIGGER    all  --  vlan2  br0     0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
  129 24853 trigger_out  all  --  br0    *       0.0.0.0/0            0.0.0.0/0               
    0     0 TRIGGER    all  --  vlan2  eth0    0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth0   *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  eth0   *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 TRIGGER    all  --  vlan2  eth1    0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth1   *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  eth1   *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 TRIGGER    all  --  vlan2  eth2    0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  eth2   *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  eth2   *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 TRIGGER    all  --  vlan2  vlan1   0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  vlan1  *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  vlan1  *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 TRIGGER    all  --  vlan2  wlan0   0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  wlan0  *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  wlan0  *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 TRIGGER    all  --  vlan2  wlan1   0.0.0.0/0            0.0.0.0/0                         TRIGGER type:in match:0 relate:0
    0     0 trigger_out  all  --  wlan1  *       0.0.0.0/0            0.0.0.0/0               
    0     0 ACCEPT     all  --  wlan1  *       0.0.0.0/0            0.0.0.0/0                          state NEW
  129 24853 ACCEPT     all  --  br0    *       0.0.0.0/0            0.0.0.0/0                          state NEW
    0     0 DROP       all  --  *      *       0.0.0.0/0            0.0.0.0/0

Code:

root@DD-WRT:~# iptables -vnL -t nat
Chain PREROUTING (policy ACCEPT 456 packets, 70320 bytes)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:8080 to:192.168.1.1:443
    2    84 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:22 to:192.168.1.1:22
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:23 to:192.168.1.1:23
    1    36 DNAT       icmp --  *      *       0.0.0.0/0            80.108.50.31         to:192.168.1.1
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:555 to:192.168.1.50:555
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:555 to:192.168.1.50:555
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:9000 to:192.168.1.50:9000
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:9000 to:192.168.1.50:9000
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:88 to:192.168.1.3:80
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:88 to:192.168.1.3:80
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:32400 to:192.168.1.50:32400
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:32400 to:192.168.1.50:32400
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:222 to:192.168.1.50:222
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:222 to:192.168.1.50:222
  277 14380 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:3389 to:192.168.1.27:3389
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:3389 to:192.168.1.27:3389
    3   152 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpt:46340 to:192.168.1.17
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpt:46340 to:192.168.1.17
    0     0 DNAT       tcp  --  *      *       0.0.0.0/0            80.108.50.31         tcp dpts:7771:7772 to:192.168.1.29
    0     0 DNAT       udp  --  *      *       0.0.0.0/0            80.108.50.31         udp dpts:7771:7772 to:192.168.1.29
   54  4798 TRIGGER    all  --  *      *       0.0.0.0/0            80.108.50.31        TRIGGER type:dnat match:0 relate:0

Chain INPUT (policy ACCEPT 102 packets, 5766 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain OUTPUT (policy ACCEPT 2 packets, 164 bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain POSTROUTING (policy ACCEPT 282 packets, 14700 bytes)
 pkts bytes target     prot opt in     out     source               destination
  137 22717 SNAT       all  --  *      vlan2   192.168.1.0/24       0.0.0.0/0            to:80.108.50.31
    0     0 RETURN     all  --  *      br0     0.0.0.0/0            0.0.0.0/0            PKTTYPE = broadcast
    0     0 MASQUERADE  all  --  *      br0     192.168.1.0/24       192.168.1.0/24
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 9:58    Post subject: Reply with quote
The rules are there and working at least for this port:
Quote:
156 8398 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.27 tcp dpt:3389

277 14380 DNAT tcp -- * * 0.0.0.0/0 80.108.50.31 tcp dpt:3389 to:192.168.1.27:3389


So maybe nothing listening/reponding on that address?

_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 10:13    Post subject: Reply with quote
egc wrote:
The rules are there and working at least for this port:
Quote:
156 8398 ACCEPT tcp -- * * 0.0.0.0/0 192.168.1.27 tcp dpt:3389

277 14380 DNAT tcp -- * * 0.0.0.0/0 80.108.50.31 tcp dpt:3389 to:192.168.1.27:3389


So maybe nothing listening/reponding on that address?

this adress exists and the port. its my own RDP Server, or have i missunderstood something? my english is not my primary language...
right, this one is working, the port is open! but why not the others?
maybe because its out of the range of the dhcp adress the other ip adresses, but 192.168.1.20 is the last ip adress in the dhcp adress range

PS. No thats not the reason 192.168.1.27 is out of the dhcp range too
I set all manually ip adresses from the port forwarding

PPS.oh i see on the table it forwarding the wrong ip adress 192.168.1.31 and not 192.168.1.29 like on the pictures, how is that possible?


Last edited by rah84 on Fri Sep 15, 2023 10:21; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 10:19    Post subject: Reply with quote
Other rules are also there as you can see from the iptables.
Torrent rule is also hit as you can see.

So the rules are there, if it does not work there is no one listening/responding

_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 10:23    Post subject: Reply with quote
Ah so it must listening then the port is open? they arent listening right now to the ports, this is the problem?
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 10:25    Post subject: Reply with quote
No the port is open but you cannot check if no one is answering
_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 10:29    Post subject: Reply with quote
i try to listening the app for the port 7771 and see if the port is open and answering
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 10:36    Post subject: Reply with quote
Okay i tried the App but i get no connection, and its listening now the port 7771
but the port is still not open, Connection refused
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 11:09    Post subject: Reply with quote
The rules are there as you can see.

You can check if they are hit if not something wrong with sender side e.g. wrong IP address/port, blocked by ISP etc.

But the problem does not seem to be the port forwards, so look elsewhere.

_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 11:44    Post subject: Reply with quote
the ISP isnt blocking the ports.
it was open before. Before i have resetted the Router i have removed the lines from Port Forwarding then the port magically was open even if not more set in ddwrt. I dont understand this.
Its good to know that its not on Port Forwarding site, i mean it were good that is was on this site then it could find the problem easilier.
But it was working before normally after setting the port forwarding rules the Port was open, maybe its really the ddwrt version, i will try an older version where i know it has worked
And So, i dont know what to do else, just disabling Windows Firewall was the last idea.
I tried port forwarding with two IPs one from the Virtual Machine and one my real machine
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 14:49    Post subject: Reply with quote
I tried older version where it worked but it still doesnt work, i really dont understand.
I dont know where i can look for the problem elsewhere, i have no idea Sad
Now i get the error: Reason: No route to host
the IP adress is correct 100%
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12499
Location: Netherlands

PostPosted: Fri Sep 15, 2023 15:54    Post subject: Reply with quote
rah84 wrote:
I tried older version where it worked but it still doesnt work, i really dont understand.
I dont know where i can look for the problem elsewhere, i have no idea Sad
Now i get the error: Reason: No route to host
the IP adress is correct 100%


I do not know where the portforwarding is going to but maybe that is broken or does not have the right IP address.

_________________
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
rah84
DD-WRT Novice


Joined: 28 May 2015
Posts: 41

PostPosted: Fri Sep 15, 2023 17:34    Post subject: Reply with quote
Thanks for help anyway
Damn i dont know what i should do now...
The Port Forwarding goes to my Surface Pro 7 Laptop and one to my VM, both i set a static ip adress
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
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