Solution for macOS 13 Ventura which does not require 3rd party utility:
/usr/bin/defaults write /private/var/root/Library/Preferences/com.apple.BTServer.plist defaultPoweredState off
According to everymac.com, the model number A1311 covers the 21.5-inch iMacs given in the table below.
Pre-Installed OS X
Internet Recovery Capable
i used balena etcher on High Sierra to flash the usb, an just when it finished it said something like the computer couldn't read the inserted disk; then when i restarted while holding option, the usb ...
You can avoid triggering the firewall by only binding to localhost instead of all interfaces, if you don't need to have your application accessible over the network.
Here's an example using python3's ...