Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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

1 Answer 1

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 Terminal.app (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

 
discard

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.