Static Route - maybe i'm misunderstanding something?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
MuzzleVelocity
DD-WRT User


Joined: 23 Apr 2010
Posts: 125

PostPosted: Tue Jan 09, 2018 2:43    Post subject: Static Route - maybe i'm misunderstanding something? Reply with quote
so all the computers on my LAN all have 192.168.1.xx addresses. I have a single device on the lan with a static ip 10.10.10.18 (its a piece of equipment i'm testing...)

so I ASSUmed that I could setup a static route to allow my computer to access this 10.10.10.18 device.

using the GUI I set destination LAN NET to 10.10.10.0, subnet mask to 255.255.255.0, gateway 0.0.0.0 and interface LAN/WLAN

no dice. what am i missing? thanks.
Sponsor
MuzzleVelocity
DD-WRT User


Joined: 23 Apr 2010
Posts: 125

PostPosted: Tue Jan 09, 2018 21:39    Post subject: Reply with quote
from what I read i probably need to execute IPTABLES commands.

but is what I'm trying to do even possible with this setup (without add an additional router I mean)?
MuzzleVelocity
DD-WRT User


Joined: 23 Apr 2010
Posts: 125

PostPosted: Wed Jan 10, 2018 14:08    Post subject: Reply with quote
eibgrad wrote:
Wrong approach. Instead, you need to bind that same network to the router. Now when the target is referenced by a client on the primary network, it goes to the router, which then routes it back into the LAN and over to the target.

Code:
ifconfig $(get_wanface):1 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255


The above goes in the startup script, NOT the firewall.


Thanks, this did help me get it working! But your example was creating the new interface on the wan side, so i changed it to:
Code:
ifconfig br0:1 10.10.10.1 netmask 255.255.255.0 broadcast 10.10.10.255

(The 10.10.10.xxx device and the 192.168.1.xx PC that needs to access it are both on the lan side of the same router).

One other thing I noticed, it seems I had to go in to the 10.10.10.xxx devices and explicitly set their default gateways to 10.10.10.1 to make it work reliably. Which makes sense since they have static ip addresses.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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 can attach files in this forum
You can download files in this forum