Nobody can connect to my server (outside my domain)

Hello everyone,

Recently I started a server project for my Arduino Ethernet-shield. The server is up and running and it works fine. When I type the ip-address on my URL I can find and edit my server, however when I ask my friend to connect to my server he can't connect to it (he is not connected to my router/domain). The steps I have done for my router and the Arduino are:

  • I have a H368N as router (net the best, but jea it works!)
  • The MAC address of the Ethernet-shield is: 0xDE,0x10,0x9A,0xEE,0xB0,0x13 (is set in the code)
  • Ip-address of my server (Ethernet-shield) is 192.168.2.2

For the router options enabled I have done:

  • Port forwarding for my IP adress to IP 192.168.2.2
  • DHCP Binding set to 192.168.2.2 (think this is necessary?)

As for my friend I gave him the following link: http://192.168.2.2/ But jea didn't seem to work.

So my question, what did I do wrong? Can the Ethernet-shield go on the Web? Or did I do something wrong in my settings? I have included my program that I use for this setup :D.

Thanks for the replies!

Webserver_V1.ino (2.78 KB)

Your friend cannot connect to your network using a private IP. Your friend must use your public IP.

let him type http:///80.
If you google what is my Ip adress, you can find out what your home IP adress is. This changes every week or so.

I assume you use port 80 for a web page wright as used the webserver demo sketch?

Thanks for the replies! I will ask him to add /80 (port 80) on my link (like: http://192.168.2.2/80). I'll let you know the results!

Forsterra:
Thanks for the replies! I will ask him to add /80 (port 80) on my link (like: http://192.168.2.2/80). I'll let you know the results!

That will fail for two reasons.

  1. Your friend cannot reach a 192.168.x.x IP on your network. That is a private IP available on the local network router.

  2. The port 80 should be added as a colon, like this http://1.2.3.4:80 but it does not need to be added because http specifies port 80 by default.

edit: Use this web page to find your public ip.

Thanks for the support guys! I have found the problem.

The problem was that my router its UPnP function must be enabled. Man I feel dumb right now haha!

Forsterra:
Thanks for the replies! I will ask him to add /80 (port 80) on my link (like: http://192.168.2.2/80). I'll let you know the results!

Another problem: Many ISP do not allow port 80 inbound connections. They don't want private WebServers. Many allow 8080 though.

Chuck.