1

I have a 4G router (DLINK DWR-921), its connected to the internet and its local IP is 192.168.0.1

I also have a WiFi router (ASUS RT-AC87U).

Connected to the WiFi router i have a raspberry pi box that is running a node app accessible on port 1234

So a quick diagram:

INTERNET ---->4G Router---->WiFi router----->RPI box

The reason i don't use just the 4G router is that its not that reliable.

How can i access the RPI box from the internet?

I have tried to mess with the routers settings but almost everytime i had to reset them as i got it wrong.

Some more details:

4G router = 192.168.0.1 - DHCP ON, WiFi off and LAN connected to the Wifi Router (LAN port to the Asus's WAN port)

WiFi router - 192.168.1.1 - DHCP ON, WiFi ON, LAN connected to the RPI box, WAN ip: 192.168.0.50 (given probably by the 4G routers DHCP server)

RPI box - 192.168.1.10 - DHCP given IP

I also want to mention that the RPI box has an internet connection.

Can someone please help me connect these things and access my RPI box from the internet.

Let me know if you anyone requires more details.

Thank you.

  • What do you mean by accessing your RPI from the internet excatly? Do you want to establish a ssh connection via another machine through the internet? Because that's going to be difficult as you won't be able to even reach your 4G router directly due to mobile network structure. – Zaheylu Oct 24 '15 at 0:00
  • I want t be able to access certain ports amongst which 22 as well. – alex.b Oct 24 '15 at 11:29
  • I don't understand the reason of the down-vote. I can access the 4G quite fine off the internet via DDNS. – alex.b Oct 24 '15 at 11:30
1

Your current setup as detailed above is double NAT. This is causing your issue.

  1. Turn your Wifi router into a Wifi AP. If it has an AP mode, use that, if not, disable DHCP, disable firewalling, give static IP in 0. range)
  2. Give RPI a static IP within the 0. range
  3. Forward applicable ports to said IP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.