Yeah I'm using bitcoin core. This didn't seem to solve much. I've specified my onion address via the externalip param and I'm still getting connected to via regular IPv4 addresses. Tried with discover on(1), and off(0).
Have you followed the instructions to add
bind==127.0.0.1:8334=onion to your config to prevent clearnet inbound connections?
Because
onlynet=onion only works in outbound connections like what you've described.
Don't forget to restart Core to apply the new bitcoin.conf settings.