Prevent DNS resolution error when using sudo