After reading the question about a manipulated google analytics script I wonder how you would protect against this kind of attack.
What comes to mind is setting DNS IP fixed in network configuration or using a tunnel, but in both cases you would not detect the attack.
Is there a way to protect yourself and also be able to detect the attack?