Two Arduino Communication Over Internet via Ethernet Shield

I have two Arduino Uno and two W5100 Ethernet Shield. I want to connect two Arduino over internet. For example when I push the button on 1st Arduino, the led on 2st Ardino is up. If you say any idea for this issue or give an examle, I will be very happy. Thank you.

I want to connect two Arduino over internet

Do you really mean over the Internet, i.e the 2 boards are not on the same local network ??

It is possible to communicate from one board to another over the Internet, however the biggest difficulties are in configuring the router on the network containing the receiving Ardruino, rather than any specific programming issues on the Arduino boards.

For example 1st arduino will be in England, 2st arduino will be in Germany. When I push the button on 1st arduino in england, led is up in Germany. are there any example explain how it works?

Run a web server on your Arduino in Germany, probably best if its on a non standard port e.g. 8080

Find out the IP address of your Internet connection in Germany e.g.

Put your Arduino on a fixed ip on the internal net in Germany e.g

Configure your ip router in Germany to route all incoming traffic on port 8080 to interna address

In the uk request a web page on address.

Your arduino should receive the page request, and you can parse and post or get variables according and turn an lad on or off.

Ps. You can do the same thing with raw top data, but its probably easier starting with the web server as there is example code for this

Thank you very much. This is so illustrative response. Did you deal with a project like this issue before? If it is possible can you please share with me codes and explanation or a link which explane that.