11

When I turned my computer on this morning this is the message I received:

This computer's local hostname "----Macbook-pro.local" is already in
use on this network. The name has been changed to
"------Macbook-Pro-2.local" To change the local hostname, open system
preferences and click sharing, then click "edit" and type the name in
the local hostname field.

This is very concerning to me since I can't think of any reason this should happen. I do not understand any of the answers I have read while do a search. I have not done anything complicated nor do I have a WiFi along with an Ethernet connection - only a WiFi connection.

I only have one router as well and I always connect to same network. The things I have done differently are:

  • I have added a printer and have also downloaded Whatsapp but have not used it yet.
  • I opened Skype last night and have not done that in a while so maybe that could be the reason?

This is very concerning to me since I can't think of any reason this should happen unless it has something to do with what I said above. I am not comfortable changing settings that I really do not understand. I also felt as if I have been hacked or whatever it is called when someone takes over your computer. As I said, I am not an expert by any means and this is worrisome to me.

Can anyone please help and explain it in a way that I might understand what has happened. Thanks! Kind regards!!

3
  • Do you have access to your router and it's DHCP and/or DNS client page? Also, do you have it connected with both Ethernet and WiFi?
    – Allan
    Commented Jul 17, 2016 at 23:00
  • I had the same problem and at this moment my hostname changed to MacBook-Pro-169.local.
    – kelin
    Commented Sep 19, 2019 at 17:49
  • Do you have a device capable of bonjour proxy present on your network? Like an AppleTV? Commented Jan 20, 2020 at 20:35

4 Answers 4

4

To analyze what might be this ghost network host, the command to use is a command line (which you have to run in Terminal or xterm):

dns-sd -G v4 ----Macbook-pro.local

If this name really exists within your accessible Wi-Fi network, then you will get its IP address within the last column of output of this command as in this example:

DATE: ---Sat 09 Dec 2017---
 0:42:42.548  ...STARTING...
Timestamp     A/R Flags if Hostname                               Address                                      TTL
 0:42:42.856  Add     2  6 ----Macbook-pro.local                  10.0.2.23                                    120

If you just get one IP address, then this error message was probably an internal bug within the MacOS way to manage its DNS cache.

If you get two different IP addresses, then you have an uninvited host within your network and behind your firewall (i.e. directly on the Wi-Fi part). This might be one of your neighbor. To continue on its correct identification, you will have to use methods which are considered as direct attacks on someone's computer.

For example, you might use iStumbler to physically locate it and then have a chance to interview the owner of this new visitor of your network.

5
  • Thank you for your answer. I got this same message and scared me.. I did follow what you say and it turns that there is only one IP address :)
    – user339473
    Commented Jul 21, 2019 at 0:22
  • Why is probably an internal bug within the MacOS way to manage its DNS cache?
    – user339473
    Commented Jul 21, 2019 at 0:26
  • 3
    What if dns-sd hangs on ...STARTING... stage?
    – kelin
    Commented Oct 5, 2019 at 16:09
  • What if I get (with option -G v4v6) six different addresses, my real IPv4, 127.0.0.1, my real IPv6, FE80:0000:0000:0000:0811:A483:CFBB:4DB9%en0, FE80::1%lo0 and ::1? Commented Nov 2, 2021 at 12:44
  • @MarkusKuhn: you can check they all belong to one of your interfaces ( the Wi-Fi one, probably en0 ) with: ifconfig en0. Then there is no pirate host within your Wi-Fi network.
    – athena
    Commented Nov 4, 2021 at 11:18
2

I had this problem. It turned out that my own computer was logging in twice to the same IP address, one directly via a cord and the other via wifi, which I had forgotten to turn off.

2
  • 1
    Check your router config then, it shouldn't hand out the same IP address twice.
    – nohillside
    Commented Jul 20, 2020 at 13:58
  • Ah, on some home routers, there is a level-2 bridge connection between the LAN and WLAN, and in that case, routers may indeed hand two different IPv4 addresses on the same subnet to the same computer, because it appears with two different MACs on the same bridged network, and is therefore seen by the DHCP server as two different computers. So the solution is then presumably to either allocate the same IP address to both MACs of the same computer, or to remove the bridge and have LAN and WLAN separate subnets (and broadcast domains)? The latter may cause devices not finding each other, though. Commented Nov 5, 2021 at 14:56
0

You won't easily get hacked. Your router has a firewall which blocks all ports, unless you opened them and routing them to your internal IP address. You also have have to enable these features in your Sharing Preferences to work like File Sharing (port 21 for FTP), Remote Login (port 22 for SSH/SFTP) and a Web Server (port 80/443 for HTTP/HTTPS). These are all unticked by default.

What you can do to secure yourself

  1. Untick all the options in Sharing: enter image description here

  2. Make sure you have a difficult password on all your accounts.

  3. Enable your Firewall in System Preferences -> Security & Privacy -> Firewall

  4. Remove any Dynamic DNS services (like DynDNS) from your router (if you don't use it) that links your IP address to an actual address eg. myhouse.homelinux.com that would go to your IP address even if you get 100 new ones every day.

  5. If you removed the dynamic DNS service, restart your router to obtain a new IP address just to be sure that no one has your new IP.

  6. Check all the devices on your network, ban any unrecognized device's MAC address.

  7. Change your router password from admin/admin to something more difficult and your WiFi password. Combinations of numbers, upper & lowercase letters and special characters.

If you would like to know who this is, you can open the Terminal app, then type: ping ----Macbook-pro.local, here it will display the device's IP address and time in ms if the device responds.

  1. If it gives you an IP address, you can look up this IP address in your router at DHCP to block the device's MAC address.
  2. If you don't see an IP address, it is dead and you can change your hostname back to what it was.

Hope this helps, if anyone wants to add/change something, feel free. :)

1
  • The first sentence "You won't easily get hacked." is too much of an advertising. And in such a case, if a duplicate address is detected on the Wi-Fi side of the network, all this is happening inside of the perimeter protected by the firewall. The firewall can't protect in anyway two computers on the same side of the network (here the Wi-Fi side).
    – athena
    Commented Dec 9, 2017 at 0:06
0

If you have a virtual machine, this might be a possible cause.

In my case, I had a Windows 10 Virtual Machine that was set to "bridged network" and obtaining a separate IP address from the router.

I changed to "shared network" to resolve it in my case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .