Remote Access

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Fri May 10, 2019 19:26    Post subject: Remote Access Reply with quote
Hi there, i need some help if possible.
I have 2 routers and i want to remote access both.
I can access the 1 but can't access the 2.
LAN connected, ping ok, tried DMZ on 192.168.1.2
Thank you.

Configurations

Code:
Router 1
r39715

Op Mode: Gateway
IP: 192.168.1.1
DHCP On
Firewall On
Remote Port: 50501


Code:
Router 2
r39230

Op Mode: Router
IP: 192.168.1.2
DHCP Forwarder: 192.168.1.1
Firewall Off
Remote Port: 50502
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Fri May 10, 2019 19:58    Post subject: Reply with quote
When you configure a router w/ Router mode, that disables NAT. And that assumes you are able to add a static route to the primary router which points to the WAN ip of that second router as the gateway to the local network behind it. Without it, internet access, either local or remote, is NOT possible.

Did you do this?

Btw, this is why we don't generally recommend using Router mode. Many times ppl are using an OEM product as their primary router, and they don't always support static routes. Gateway mode avoids a lot of these problems.
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Fri May 10, 2019 20:54    Post subject: Reply with quote
eibgrad wrote:
When you configure a router w/ Router mode, that disables NAT. And that assumes you are able to add a static route to the primary router which points to the WAN ip of that second router as the gateway to the local network behind it. Without it, internet access, either local or remote, is NOT possible.

Did you do this?

Btw, this is why we don't generally recommend using Router mode. Many times ppl are using an OEM product as their primary router, and they don't always support static routes. Gateway mode avoids a lot of these problems.


They are in the same subnet, and second router is able to get NTP and DYNDNS to work also, i guess its ok, just remote management i cant access. I will try Gateway Mode and a static route. Thank you.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Fri May 10, 2019 21:16    Post subject: Reply with quote
Same subnet? Do you mean these routers are patched LAN to LAN (i.e., bridged, not routed)?
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Fri May 10, 2019 21:31    Post subject: Reply with quote
eibgrad wrote:
Same subnet? Do you mean these routers are patched LAN to LAN (i.e., bridged, not routed)?


Yes, i can access both on local network, just the remote access i can't.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Fri May 10, 2019 21:41    Post subject: Reply with quote
Ok, you threw me off when you mentioned Router mode. Gateway vs. Router mode is only relevant over the WAN. And in a bridged configuration, there is no WAN. So the Operating Mode is irrelevant.

Does the second router have a default gateway specified on its LAN side network interface?
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Fri May 10, 2019 22:17    Post subject: Reply with quote
Yes, all pointing to router 1, GW, DNS, DHCP (192.168.1.1) and its working fine..

Code:
router1 local web port 50501
router2 local web port 50502

http://myhost.ddns.net:50501 ( access )
http://myhost.ddns.net:50502 ( do not access )


Rolling Eyes
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Fri May 10, 2019 23:05    Post subject: Reply with quote
Not that I believe it's the current problem, but you don't need DHCP forwarding on the second router if the two routers are bridged (LAN to LAN). It's pointless. You can keep the DHCP server on the second router disabled.

Once all the obvious mistakes have been addressed, I'm not sure how much more can be done. It should work. It's not a complicated config. FWIW, I have seen this problem before, of not being able to reach the second router w/ port forwarding when everything else seems to be in order, but it's rather rare, and I don't recall anyone able to determine the cause. If I had to guess, it's probably an ARP problem. And it may be related to that specific hardware.

What is the make and model of both routers?
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Fri May 10, 2019 23:21    Post subject: Reply with quote
router1 >> TP-Link TL-WR841ND v8 latest r39715
router2 >> TP-Link TL-WR841ND v9 r39230

I tried also port forwarding and DMZ to 192.168.1.2, weired.
What do you mean "What is the make" ? hehe.. sry my english.
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Fri May 10, 2019 23:23    Post subject: Reply with quote
Make = Manufacturer.

I have a guess.

Try adding the following to the startup script of both routers, then reboot.

Code:
LAN_IF="$(brctl showstp br0 | grep -Eom1 "^eth[0-9]")"
swconfig dev $LAN_IF set enable_vlan 1
swconfig dev $LAN_IF set apply


If it works, I'll explain later.
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Sat May 11, 2019 0:55    Post subject: Reply with quote
I added the code to router1 startup, reboot.. and running normal. The router2 (TL-WR841ND v9) have a problem with this code, it doesn't start, no local DHCP, even fixed ip to access it localy.. no way, so i reset and tried again and upgraded the latest firmware, same, no access. I tried also with a TL-WR740 v4, this one run normal with the code.. local access ok. And about remote access, only router1 .. the new tl-wr740 with the right config.. still no remote access. Weired stuff..

Crying or Very sad
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8034

PostPosted: Sat May 11, 2019 1:44    Post subject: Reply with quote
It was just a hunch. Looks like we'll need to look elsewhere.

Did you actually disable the WAN on router #2? I know sometimes ppl don't bother when they use the router as a bridge.

And if you did, did you assign the WAN port to the LAN (the option appears once the WAN has been disabled)?

And if you did, does it make a difference whether you use the WAN port (now acting as a LAN port) vs. one of the other LAN ports?
Lusitano
DD-WRT User


Joined: 25 Jun 2014
Posts: 116
Location: São Paulo - Brazil

PostPosted: Sat May 11, 2019 16:11    Post subject: Reply with quote
eibgrad wrote:
It was just a hunch. Looks like we'll need to look elsewhere.

Did you actually disable the WAN on router #2? I know sometimes ppl don't bother when they use the router as a bridge.

And if you did, did you assign the WAN port to the LAN (the option appears once the WAN has been disabled)?

And if you did, does it make a difference whether you use the WAN port (now acting as a LAN port) vs. one of the other LAN ports?


Yes, WAN disabled and assign wan port do lan, but i haven't tried the wan port, i'll try today.. later. Smile
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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