MITM attacks can be mitigated by implementing strong encryption and authentication. Encrypting your wifi network with WPA2 and using a paid version of VPN in public networks will help.