Main Site Documentation

FEZ Domino Web Server Port Forwarding Problem


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);

I can set up the web server and reach it from my LAN, 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. nothing happens and I get a connection time out error. All my other ports , …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.



Hello !

Are you sure you set up correcty your nat on your router ? (nat tcp 8070 -> : 8070). On some devices using UPNP, you don’t need to do that, but on your fez domino you need to do it manualy.

If this is not the problem, try to change your mac address. I found out for myself that some firewalls/router don’t accept to forward/let pass some class of mac addresses like this one. Try for an example your pc’s mac address+1 !


Dear Nicolas,

Many many thanks for your excellent idea! Yes the problem is solved when I changed the MAC address for FEZ Domino.I added +1 to my PC’s MAC address and it worked great :slight_smile:

For those who might be interested, I used a simple application from to convert my
PC’s (Hex) MAC address to the BYTE ARRAY.

Thank you very much once again for your excellent help.

Best Regards,



Great !

FYI you can put directly hex in your byte array.

For your example, you could have used directly for 6b:00:12:37:11:ab :
byte[] mac = { 0x6B, 0x00, 0x12, 0x37, 0x11, 0xab };


Dear Nicolas,

Thank you very much once again :)Your help is very much appreciated !

Best Regards,