I am a very novice user, using a FEZ Domino board with WIZnet_W5100 ethernet shield .I am trying to set-up a FEZ based web server that can be reached from a remote network(location).I use the straightforward code given in this forum.
const Int32 c_port = 8070;
byte[] ip = { 192, 168, 2, 180 };
byte[] subnet = { 255, 255, 255, 0};
byte[] gateway = { 192, 168, 2, 1 };
byte[] mac = { 11, 11, 11, 11, 11, 11 };
WIZnet_W5100.Enable(SPI.SPI_module.SPI1, (Cpu.Pin)FEZ_Pin.Digital.Di10, (Cpu.Pin)FEZ_Pin.Digital.Di9,true);
NetworkInterface.EnableStaticIP(ip, subnet, gateway, mac);
NetworkInterface.EnableStaticDns(new byte[]{192,168,2,1});
Socket server = new Socket(AddressFamily.InterNetwork,SocketType.Stream, ProtocolType.Tcp);
IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, c_port);
server.Bind(localEndPoint);
server.Listen(1);//Int32.MaxValue);
I can set up the web server and reach it from my LAN http://192.168.2.180:8070, it is working OK on the LAN. When I try to provide a NAT port forwarding /routing to reach from my global IP address i.e. http://75.76.22.12:8070 nothing happens and I get a connection time out error. All my other ports http://75.76.22.12:80 ,http://75.76.22.12:8090 …so on are working OK, I thought the problem is related to Static IP settings (NetworkInterface.EnableStaticIP) but I have not been able to figure out what is wrong.
Your help will be much apprecaited.
Umit