A Strange Disease Mac OS

Resolving a Strange UniFi and macOS Incompatibility

I recently upgrade my network stack to a Ubiquiti UniFi-based setup. Overall,it's been an awesome upgrade and I've really enjoyed working with the hardware.However, I was getting bit by a pretty serious bug when it came to my primarydesktop machine - a 2018 Mac Mini.

Strange

My current network rack setup is as follows (I'll get these on my gear pagesometime soon):

A Strange Disease Mac Os X

  • UniFi Switch PRO 24 PoE -Connected to UDM-Pro viaDirect Attach Copper Cable, SFP+

Compatible with Windows XP+, Mac OS 10.6+ and Linux - Play as Brandon (male) or Kaitlyn (female) - 5 romances for both protagonists: Ashley, Viktor, Sabrina, Nadia and Tyrone - Simplified scheduler gameplay with no stat raising required - Two variant endings for each love interest based on your choices. Mac and Guy have a strange disease.; )No copyright infringement intended. No profit is being made, it is purely for entertainment purposes.

Currently, everything is connected to the 24-port switch, generally with powercoming from the PoE-functionality it offers. The network was simple at the time,with just the primary LAN and two WLANs (one for regular use, the other for IoTdevices), and relatively standard-out-of-the-box configuration.

I was assigning static IP addresses for some of the primary devices on thenetwork, such as my NAS and primary workstations. Everything was workingbeautifully, with one huge exception: my Mac Mini was constantly losing internetaccess.

Debugging the Mac Mini Connectivity

When working with the Mac Mini, I was able to assign a static IP, access allnetwork resources, and for a short period of time I was able to access theinternet (I would run speed tests and browse via Safari). However, after a fewminutes, I would lose connectivity to the internet, but not the network. A speedtest would not run, and browsing the internet only worked for domains I hadpreviously visited.

Knowing that final point, I assumed there was an issue with DNS. If I usedanother browser, such as Chrome, that didn't use some of the baked-in macOSfunctionality, the internet would mostly work, albeit very slowly.

I started all possible debugging steps I could think of:

  • Flushing the local DNS cache and killing mDNSResponder. I even created analias to make it easier in zsh:

    alias flushdns='sudo ifconfig en0 down; sudo ifconfig en1 down; sudo killall -HUP mDNSResponder; sudo killall -HUP mDNSResponder; sudo killall -HUP mDNSResponder; sudo killall -HUP mDNSResponderHelper; sudo killall -HUP mDNSResponderHelper; sudo dscacheutil -flushcache; sudo ifconfig en1 up; sudo ifconfig en0 up'

  • Flushing locally cached routes to see if the gateway was interfering. Again,created an alias since I was running the command so frequently:

    alias resetroutes='sudo ifconfig en0 down; sudo ifconfig en1 down; sudo route -n flush; sudo route -n flush; sudo route -n flush; sudo ifconfig en0 up; sudo ifconfig en1 up'

  • Logging into the UDM-Pro via ssh and monitoring the logs viatail -f /var/log/message to see if the firewall was blocking traffic

  • Creating firewall rules to allow all traffic both in and out of the LANand WAN
  • Enabling and disabling any settings that looked at packets: Deep-PacketInspection, IGMP Snooping, DHCP Snooping, DHCP Guarding, etc.
  • Disabling static IP assignment and just utilizing DHCP.
  • Clearing all macOS caches viaOnyx andCleanMyMac X - both excellent tools that Ihighly recommend.
  • Reinstalling macOS to ensure local system files or configuration weren'tcorrupted.
  • Comparing settings to my MacBook Pro, that has both ethernet and WiFI setup(just like the Mac Mini), but had absolutely no issues – no huge configurationdifferences.
  • Ran Wireshark to hunt down any traffic thatlooked worrisome to any degree.
  • Resetting the UDM-Pro back to factory settings and reconfiguring it.

A Strange Disease Mac Os Catalina

During this debug process, there were moments where the internet connectivityseemed to come back. For example, when I switched static IP address assignmentoff and renewed my IP address via DHCP, I would get access again for a fewminutes. From there, I tested manually changing my address to a different IPaddress, with each time giving me access for a brief window yet again.

As my last step, when I decided to reset the UDM-Pro back to factory, I wentthrough every possible internet-bound setting with a fine-toothed comb, turn iton and off to see when my connectivity would come back. And finally, I found theculprit.

UPnP

From Wikipedia:

Universal Plug and Play (UPnP) is a set of networking protocols that permitsnetworked devices, such as personal computers, printers, Internet gateways,Wi-Fi access points and mobile devices to seamlessly discover each other'spresence on the network and establish functional network services for datasharing, communications, and entertainment. UPnP is intended primarily forresidential networks without enterprise-class devices.

In the new UniFi settings pages, you can configure this via this page:

However,some security researches consider UPnP to be a security risk,as it allows applications and services to open and close external ports on yourgateway. While this can be a very useful feature, especially for those of ususing Game Consoles where a large number of ports may be required to allowaccess to online game networks, it does give a pause for concern.

A Strange Disease Mac Os 11

Generally, I'm ok with leaving this setting on since I have a 'small' networkthat I manage well. It never crossed my mind that this could be the issue in myMac Mini woes. Once I disabled this setting in UniFi, everything workedbeautifully. I was able to set my static IP address, have both my ethernet andWiFi adapters enabled, and use all internet services.

While this does fix my issue, it does give me some concern at the same time.That means there are services on my Mac Mini asking for UPnP configurationchanges (probably excessively). I still need to find what those services are;they would most likely be third-party as my MacBook Pro had no issues and that'sa relatively stock installation of macOS.

A Strange Disease Mac Os Download

Conclusion

I wish I would have thought to disable UPnP earlier on in the process. I spentprobably twenty or more hours debugging this issue, just to find it was a singlecheckbox. Hopefully if you run into this issue, you found this post quickly.There was one post in theUbiquiti Community (Apple Mac Woes via Ethernet and WiFi)that looked very close to my problem, but that was a couple years old with noanswer – hopefully they found a similar solution.

I noticed a strange behaviour of mouse cursor - it quite frequently does not change its shape. For example when I'm in Terminal application and I move my cursor out of the Terminal window the cursor is still in the shape of 'text selection'. But sometimes it properly changes it shape to arrow. The same applies for Safari and other apps - its rather random, sometimes it changes, sometimes not, sometimes I have bad cursor for a while, and then it suddenly (after some moving&clicking) changes its shape to proper one. I have a USB Logitech mouse, but I don't think its mouse-related problem? Maybe something with focus on applications, or general window management problem?
Its a bit frustrating
Maybe someone already had such problem? I tried to search but haven't found this specified problem. Thanks for any help.