I set up a full node and after some research, I decided to run it through Tor. The issue I’m facing is that my incoming connections are still coming in over IPv4, while my outgoing connections are the correct Tor/onion addresses. I could just disable incoming connections using "bind=127.0.0.1" in my bitcoin.conf file, but that kind of defeats the whole point of running the node to help the network, right? I’ve tried a bunch of different settings in both bitcoin.conf and torrc, but I still can’t get it to work.
Is it typical for people using Tor for their node to only accept connections from other Tor addresses, or do most just connect out to those Tor addresses while still receiving connections from regular IPv4 ones?
Using Bitcoin Core?
Set the provided args in the third option in this official documentary for Bitcoin Core client: https://github.com/bitcoin/bitcoin/blob/master/doc/tor.md#3-manually-create-a-bitcoin-core-onion-service
Most importantly, the --externalip that you can get from "C:/Tor/tor/hidden_service_directory/hostname" based from the "HiddenServiceDir" that you've set in your torrc file.
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). ALL of my outbound connections are to a tor address, but ALL of my inbound connections are regular IPv4 connections. I guess that's fine as long as they're connecting to MY onion address and not MY IPv4 address? How would I know?
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.
That seems to have done the trick. Thank you. I get a LOT fewer inbound connections now (for obvious reasons), but the ones I get are via the onion network and not an IPv4 connection, which is what I was trying to achieve.