The Monero Research Lab (MRL) has decided to recommend that all Monero node operators enable a ban list
https://github.com/Boog900/monero-ban-list/blob/main/ban_list.txt
- Download the ban list and:
./monerod --ban-list <file-path-to-ban-list>
🧐 https://gist.github.com/Rucknium/76edd249c363b9ecf2517db4fab42e88
Best solution when connecting to public nodes would be through Tor. Even if the public node is a spy node somehow with tor enabled, they would still be able to see requested blocks but would not be able to pinpoint who is requesting. It still adds a good layer and is recommended by most, but it is not perfect because Tor is also somewhat under a timing attack.