Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I connect to various VPN servers (Windows PPTP, Cisco IPSEC) the hostname of my laptop gets updated.

Is there a setting somewhere that will stop this from happening?

share|improve this question

The VPN's DNS server probably assigns hostname together with the IP address and the computer uses it instead of what you've set during setup and what appears in System Preferences -> Sharing -> Computer name.

To set a permanent hostname do sudo scutil --set HostName DesiredHostname in (there are also ComputerName and LocalHostName that can be changed there).

You can still* set it in /etc/hostconfig, by adding HOSTNAME=DesiredHostname at the bottom of the file. (*I am using this, but it may be depreciated at some point as the beginning of that file says # This file is going away).

Restart may be required in either case.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.