What's new

General (simple?) routing question. (Port forwarding?)

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

JaimeZX

Senior Member
Hey guys. So from another thread you may have gathered I have a cheap Linksys router I picked up a few weeks ago.

Anyway, I have it plugged into Port 1 of my Asus and assigned it a static IP of 192.168.2.254.

Plugged into Port 1 of the Netgear is a Raspberry Pi I'm using as a little Home Automation server, at 192.168.100.250:8123.

How do I set this up in the router(s) so that machines on the Asus network can communicate with the RPi? Obviously if I try to access 192.168.100.250 from the 192.168.2.0/24 it times out. So what am I missing?
I looked in the Asus at Port Forwarding but that's clearly for forwarding WAN requests on (8123) to a certain LAN port, not for directing internally.

Thanks in advance!
 
This is really a question for a Linksys forum. But in principle you need to setup port forwarding on the Linksys, not the Asus.
 
Happy to X-post in the Linksys forum as well. In fact, I did try Port Forwarding in the Linksys, but I'm still not sure how I would address the RPi from the Asus LAN. I tried http://192.168.2.254:8123 (web interface for the application on the RPi is @ :8123) and that didn't work any more than http://192.168.100.250:8123, (which works if my laptop is connected to the Linksys Wifi vs Asus Wifi) so I'm clearly missing something. Thanks for the input! :)
 
I don't know anything about Linksys routers (and you never said the model) but http://192.168.2.254:8123 would be what I would expect you to use assuming you are forwarding port 8123.

Check the configuration on the Pi. It's possible that the firewall and/or web server is configured to only allow access from the local subnet (192.168.100.x).
 
Hey guys. So from another thread you may have gathered I have a cheap Linksys router I picked up a few weeks ago.

Anyway, I have it plugged into Port 1 of my Asus and assigned it a static IP of 192.168.2.254.

Plugged into Port 1 of the Netgear is a Raspberry Pi I'm using as a little Home Automation server, at 192.168.100.250:8123.

How do I set this up in the router(s) so that machines on the Asus network can communicate with the RPi? Obviously if I try to access 192.168.100.250 from the 192.168.2.0/24 it times out. So what am I missing?
I looked in the Asus at Port Forwarding but that's clearly for forwarding WAN requests on (8123) to a certain LAN port, not for directing internally.

Thanks in advance!

This will be a LAN routing problem/solution. The screen you're looking for will be this one:

Lan Route.PNG


Fill in with the numbers I've provided.
The Network you're trying to reach is the Pi (192.68.100.250).
The Network you're going via is the Linksys (192.168.2.254).
The metric is the priority.

Remember to click the (+) icon to add the route before you click apply.

That alone will not be guaranteed to work first time, since there are still some unknown variables about your network setup, but it could very-well work first time. I would ask for more detailed info, but for now, see if this works.
The extra info needed for would be all the Lan ip addresses:
  • Client (your laptop/pc) Lan ip
  • Asus Lan ip (found in the Asus webgui)
  • LinkSys Lan ip (found in the LinkSys webgui)
That info, for now I've made some assumptions about. So the static route I've posted will still work fine if my assumptions are correct, but if you try the route and it doesn't work, then you can supply that extra information.
 
Last edited:
A static route would only be required if he has disabled NAT the firewall on the Linksys.
 
Last edited:
The easy way is to set the RPI in the Linksys DMZ. I.O.W. in the Linksys enable DMZ to the reserved IP address of the RPI.
 
A static route would only be required if he has disabled NAT on the Linksys.

Assuming that my diagram of
JaimeZX's network is complete and accurate:

Client (laptop/desktop PC)[192.168.2.2] --> ASUS [192.168.2.1] --> LinkSys [as client 192.168.2.254] [as server 192.168.100.1]--> rPi [192.168.100.250]

The NATing status of LinkSys wont invalidate the need for a static route on the ASUS, because 192.168.100.1 is unknown to the client (laptop/desktop PC), even when NAT is enabled on the LinkSys. So "ping 192.168.100.250", will not get a reply until that route is in place. Happy to be wrong though, just consider this my education, I will be curious to know how the Client discovers the LinkSys as 192.168.100.1, since LynkSys is both a client and server (client to Asus, server to Pi) and ultimately, ASUS does not know 192.168.100.1 exists, so how can it send packets to that route?
 
Last edited:
@MaziahBebop If he wanted to access the Pi using its real address (192.168.100.250) he would indeed need a static route. He would also need to change the Linksys' firewall so that it forwarded unsolicited traffic. Quite what the option for that would be on a Linksys I don't know. You're probably correct and it's not actually called "NAT" (I likely used the wrong word), it could just be a case of turning off the firewall.

* I have corrected my post #6.

The alternative that I was suggesting is that he uses the Linksys' WAN IP address and port forwarding. This is effectively the same as @bbunge's suggestion of putting the Pi in the Linksys' DMZ.
 
@MaziahBebop If he wanted to access the Pi using its real address (192.168.100.250) he would indeed need a static route.

Precisely what he is trying to do:
"How do I set this up in the router(s) so that machines on the Asus network can communicate with the RPi?"


We're talking Lan here. No need to do Wan stuff.


He would also need to change the Linksys' firewall so that it forwarded unsolicited traffic.
Not required in this scenario.
 
Last edited:
Precisely what he is trying to do:
"How do I set this up in the router(s) so that machines on the Asus network can communicate with the RPi?"


We're talking Lan here. No need to do Wan stuff.
Either way will work. He mentioned port forwarding in the title and that is more familiar to most users. So that's what I went with.

He never said that there's a requirement to access the entire LAN, only the Pi. That is easy to do with port forwarding. Your solution enables access to the entire subnet. (Strictly speaking your static route is for 192.168.100.0 rather than 192.168.100.250)
 
He mentioned port forwarding in the title and that is more familiar to most users. So that's what I went with.

I think that mention was more of a question, like "Is this a port forwarding problem?". To which the answer is.... no.


(Strictly speaking your static route is for 192.168.100.0 rather than 192.168.100.250)

Replace 255.255.255.0 with 255.255.255.255, if you want that kind of specificity. Probably best not to start a WAN port forward, DMZ etc etc.
I think you would agree on that last part, so lets wait until JamieZX is back with some feedback. Keep in mind, the network mapping assumptions are still incomplete, so there could be more to this solution yet. But a great start will be: implement the static Lan route on the ASUS.
 
Last edited:
Hey guys, great discussion and thanks so far!

I tried MaziaBebop's static route but no success. Unable to ping 192.168.100.250 or access the app GUI at either 192.168.2.254:8123 or 192.168.100.250:8123.

HOWEVER. Putting the RPi in the DMZ DID allow me to access it at 192.168.2.254:8123. SO.... win! Thanks all, again!
 
He would also need to change the Linksys' firewall so that it forwarded unsolicited traffic.
Not required in this scenario.
This would be required for an Asus router, although it's quite possible the same would not be true for a Linksys. The Asus' filter/FORWARD policy is DROP when the firewall is enabled. That needs to be changed to ACCEPT. The only way to do that through the Asus GUI is to turn off the firewall.
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top