Such as other experts mentioned, this operation highly depends on your network structure. For example in the most basic environment, you can remove the default gateway from the VMKernel port that handles the ESXi management traffic, of course, IF it didn't cause losing host connectivity! If you have VLANs in your network, you can restrict internet connectivity for the ESXi host management VLAN (If the hosts have a separate VLAN ID in your planning). BTW consider this matter: Changing the VMKernel IP settings for any VMK interfaces, will never interrupting virtual machines networking, even you lost the host connection while modification some settings until you don't change the VM's port groups, they still have their connections.