@nikoko I suggest using DHCP like so. This should set the gateway and DNS IP addresses correctly. And the subnet mask.
Ethernet.begin(mac);
If the gateway IP is wrong, connections to local servers will work but connections to remote servers will fail.
Your program sets the IP address but does not specify the gateway, dns, and subnet so I am not sure what it does. If you must use static configuration, correctly specify the other parameters.