I had done this some time ago on my laptop, but had to try to remember once again while helping someone else. I am just noting it here so it is not as difficult to remember the next time :-)
Basically, the problem is:
$ netstat -an tcp4 0 0 192.168.xxx.xxx.52623 22.214.171.124.5223 ESTABLISHED tcp4 0 0 192.168.xxx.xxx.52622 126.96.36.199.5223 ESTABLISHED
These connections are established as soon as the user logs in, and maintained perpetually.
$ lsof -i 4tcp apsd 334 root 8u IPv4 0x… 0t0 TCP 192.…:52622->188.8.131.52:5223 (ESTABLISHED) apsd 334 root 11u IPv4 0x… 0t0 TCP 192.…:52622->184.108.40.206:5223 (ESTABLISHED) apsd 334 root 12u IPv4 0x… 0t0 TCP 192.…:52623->220.127.116.11:5223 (ESTABLISHED) apsd 334 root 14u IPv4 0x… 0t0 TCP 192.…:52623->18.104.22.168:5223 (ESTABLISHED)
apsd is not a rogue process or anything, but here’s what the man page says:
apsd ApplePushService daemon for Apple Push Notification service. This is part of the ApplePushService framework. There are no configuration options to apsd. Users should not run apsd manually.
Well, alrighty then.
$ sudo launchctl unload -w \ /System/Library/LaunchDaemons/com.apple.apsd.plist
turns it off, and,
$ sudo launchctl load -w \ /System/Library/LaunchDaemons/com.apple.apsd.plist
turns it back on.