2 routers problem

I am trying to control my arduino from external internet (no wifi).
My connection : modem>tplink>levelone>arduino +ethernet shield

I changed my levelone router to an ap (disabled dhcp and all that..)
And still, it doesn't work.

But when i connect the arduino to the first router, its magicly works. I can control it.

What am i doing wrong

Sorry for my poor english, i would be happy if you can help me

Are you familiar with networking and routing? Does either of the routers use a NAT (Network Address Translation)? Firewall?

Yes, i am behind nat, My ip is 192.168.1.1 and no firewall.
I forgot mention that i did port forwarding to the web server ip on the main router (tplink)
And still it not working

I would expect that the 192.168.1.1 is the address of the router - I would expect any other devices behind that router to have a hostid of something other than "1" (or "255" either - I assume your netmask is 255.255.255.0?). If you have a router feeding a router (which is what it sounds like to me) and there is an intermediate address between them of 192.168.something, that is probably the issue - the "private" IP addresses are typically not routable (routers will not pass them along to the outside world without using NAT - it almost sounds like you have two levels of NAT there from the way I read that.

some information of my network
Tplink 192.168.1.1
Levelone 192.168.1.2
Netmask 255.255.255.0
Arduino 192.168.1.185
Port forwarding to 8081

How can i fix it?

shaniyakov:
some information of my network
Tplink 192.168.1.1
Levelone 192.168.1.2
Netmask 255.255.255.0
Arduino 192.168.1.185
Port forwarding to 8081

How can i fix it?

I would change the configuration of your LEVELONE Router. Change it's internal network to something different than the TPLINK's internal network.

Something like 192.168.2.xxx.

You will have to add a forwarding rule to the TPLINK, and a forwarding rule to the LEVELONE.

Say port 8080 on the TPLINK to 8080 on the LEVELONE to 80 on the Arduino.

To use it, you would http:\yourTPLINKWanAddress:8080

The TPLINK would forward it to 192.168.1.2:8080
The LevelOne woud forward it to 192.168.2.185:80

Your Arduino would be configured to with an IP address of 192.168.2.185, netmask 255.255.255.0, default route 192.168.2.1, listening to port 80.

Chuck.

Still not working.

If changed levelone address to 192.168.2.10
Why tplink forward to 192.168.1.2
What is this address now?

And can you please explain that?

chucktodd:
Say port 8080 on the TPLINK to 8080 on the LEVELONE to 80 on the Arduino.

shaniyakov:
Still not working.

If changed levelone address to 192.168.2.10
Why tplink forward to 192.168.1.2
What is this address now?

And can you please explain that?

In each of your Routers, find the 'Forwarding Rules', 'Virtual Servers'. This image is from a TPLink N750 Router:

With this TPLink Router, Select 'Forwarding', then 'Virtual Servers', then 'Add New'.

My configuration has my internal network 192.168.2.1 (tplink router).

I set up a forward WANip:8080 -> TPLink -> ARDUINOip:80

So my forwarding rule would be:
Service Port: 8080
Internal Port: 80
ipAddress : 192.168.2.185

Chuck.

shaniyakov:
Still not working.

If changed levelone address to 192.168.2.10
Why tplink forward to 192.168.1.2
What is this address now?

And can you please explain that?

Is this your Network configuration?

1) WAN -> Modem -> TPlink ->LevelOne ->Arduino?

or

2) Wan -> Modem ->    Tplink -+->   LevelOne
                              |-> Arduino?

if it is 1) then:

Network configuration
Device:          WAN IP                          Internal Local IP Network
TPLink        (ISP Issued)                        (192.168.1.1)
LevelOne    (You assigned, 192.168.1.100)        (192.168.2.1)
Arduino     (You assigned, 192.168.2.100)      (no Internal IP, not a router)

If you are usings setup 2), the LevelOne router is not being used.

If your network setup is 1), then the TPLink's WAN address is assigned by your ISP (modem). You can configure the TPLink's internal network. Setup the TPLink's Network (local) to 192.168.1.1, its Network Mask to 255.255.255.0. Configure the TPLINK's DHCP pool from 192.168.1.2 to 192.168.1.99.

In your LevelOne router, SET ITS WAN IP to 192.168.1.100 (not inside the TPLink's DHCP Pool)
In Your LevelOne Router SET is LOCAL IP to 192.168.2.1, its Network Mask to 255.255.255.0, Configure the LevelOne's DHCP pool from 192.168.2.2 to 192.168.2.99,

Configure your ARDUINO's IP to 192.168.2.100 (not in the LevelOne's DHCP Pool)

In the TPLINK Create a forwarding rule that passes all traffic the TPLink sees on it's WAN address port 8080 to the LevelOne Router at Port 8080:

Service Port 8080
Internal port 8080
IP Address 192.168.1.100

In the LevelOne Create a forwarding rule that passes all traffic the LevelOne sees on it's WAN address(192.168.1.100) port 8080 to your Arduino at Address 192.168.2.100:80

Service Port 8080
internal Port 80
IP Address 192.168.2.100

Chuck.

i tried 1st Network configuration, no success :frowning:
I wish I knew what it's mean

chucktodd:
Is this your Network configuration?

2) Wan -> Modem ->    Tplink -+->   LevelOne

|-> Arduino?

i am guessing it's an ap, but i wasn't sure so i reconfigure my network to:
modem->tplink->levelone(wan)->arduino
i also enabled the dhcp
here some picutres of what i did (i follow your instruction)

tplink:


levelone:



shaniyakov:
i tried 1st Network configuration, no success :frowning:
I wish I knew what it's mean
i am guessing it's an ap, but i wasn't sure so i reconfigure my network to:
modem->tplink->levelone(wan)->arduino
i also enabled the dhcp
here some picutres of what i did (i follow your instruction)

tplink:

levelone:

those config look good.

EXCEPT, enable NAT on the LevelONE

Can the Arduino see anything on the internet?

Can you use the Arduino WebClient Example to talk to google?

If that works, then the Arduino WebServer Example. The WebServer example listens on port 80.

can you connect to the Arduino from a local PC? on the same Net? (levelOne) 192.168.2.100:80

Can you connect to the Arduino from the TPLink net? (192.168.1.100:8080)

Chuck.

Here is a tracert from me to your IP

C:\Users\user>tracert 84.109.213.53

Tracing route to bzq-84-109-213-53.red.bezeqint.net [84.109.213.53]
over a maximum of 30 hops:

  1    <1 ms    <1 ms    <1 ms  192.168.2.1
  2    27 ms    24 ms    24 ms  172.22.120.1
  3    25 ms    24 ms    24 ms  mg-152-082.filertel.com [208.98.152.82]
  4     *        *        *     Request timed out.
  5    30 ms    30 ms    29 ms  ip-66-232-69-225.syringanetworks.net [66.232.69.
225]
  6     *        *        *     Request timed out.
  7    56 ms    49 ms    50 ms  50.242.149.1
  8    48 ms    47 ms    49 ms  173.167.58.162
  9   196 ms   193 ms   194 ms  if-ae-6-2.tcore1.PDI-Palo-Alto.as6453.net [66.19
8.127.69]
 10   225 ms   225 ms   221 ms  if-ae-2-2.tcore2.PDI-Palo-Alto.as6453.net [66.19
8.127.2]
 11   224 ms   221 ms   197 ms  if-ae-5-2.tcore2.SQN-San-Jose.as6453.net [64.86.
21.1]
 12   194 ms   194 ms   472 ms  if-ae-1-2.tcore1.SQN-San-Jose.as6453.net [63.243
.205.1]
 13   195 ms   195 ms   194 ms  if-ae-12-2.tcore1.NTO-New-York.as6453.net [63.24
3.128.28]
 14   198 ms   199 ms   199 ms  if-ae-7-2.tcore1.N0V-New-York.as6453.net [63.243
.128.26]
 15   200 ms   199 ms   199 ms  if-ae-2-2.tcore2.N0V-New-York.as6453.net [216.6.
90.22]
 16     *      199 ms   198 ms  if-ae-4-2.tcore2.L78-London.as6453.net [80.231.1
31.157]
 17   198 ms   200 ms   198 ms  if-ae-8-2.tcore2.AV2-Amsterdam.as6453.net [80.23
1.131.6]
 18   202 ms   199 ms   199 ms  if-ae-2-2.tcore1.AV2-Amsterdam.as6453.net [195.2
19.194.5]
 19   240 ms   229 ms   228 ms  if-ae-6-3.tcore1.FNM-Frankfurt.as6453.net [195.2
19.194.78]
 20   224 ms   224 ms   205 ms  if-ae-7-2.tcore1.FR0-Frankfurt.as6453.net [195.2
19.50.1]
 21   200 ms   198 ms   199 ms  195.219.50.30
 22   238 ms   239 ms   239 ms  bzq-179-161-217.pop.bezeqint.net [212.179.161.21
7]
 23   244 ms   243 ms   245 ms  bzq-219-189-125.dsl.bezeqint.net [62.219.189.125
]
 24   243 ms   244 ms   244 ms  bzq-25-77-9.cust.bezeqint.net [212.25.77.9]
 25   244 ms   245 ms   243 ms  bzq-25-82-85.cust.bezeqint.net [212.25.82.85]
 26   243 ms   280 ms   271 ms  bzq-219-189-198.cablep.bezeqint.net [62.219.189.
198]
 27   242 ms   243 ms   244 ms  bzq-114-65-46.cust.bezeqint.net [192.114.65.46]

 28     *        *        *     Request timed out.
 29     *        *        *     Request timed out.
 30     *        *        *     Request timed out.

Trace complete.