Bitcoin Forum
May 09, 2024, 09:11:23 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How to control the maximum number of onion connections to my node?  (Read 129 times)
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 09, 2022, 04:26:16 PM
 #1

Hi,

On my (RPI) node I use maxconnections to control the maximum number of connections to my node, but my understanding is that this limit applies to both onion and regular connections. I am trying to connect to the 8333 port on my node from localhost, but my connection does not work and I think it is due to maxconnections being reached. So I am trying to reserve some connection room for my local services. How can I do that? Thanks!
1715289083
Hero Member
*
Offline Offline

Posts: 1715289083

View Profile Personal Message (Offline)

Ignore
1715289083
Reply with quote  #2

1715289083
Report to moderator
1715289083
Hero Member
*
Offline Offline

Posts: 1715289083

View Profile Personal Message (Offline)

Ignore
1715289083
Reply with quote  #2

1715289083
Report to moderator
The trust scores you see are subjective; they will change depending on who you have in your trust list.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
December 09, 2022, 08:41:38 PM
 #2

You can try to use:

Code:
  -whitebind=<[permissions@]addr>
       Bind to the given address and add permission flags to the peers
       connecting to it. Use [host]:port notation for IPv6. Allowed
       permissions: bloomfilter (allow requesting BIP37 filtered blocks
       and transactions), noban (do not ban for misbehavior; implies
       download), forcerelay (relay transactions that are already in the
       mempool; implies relay), relay (relay even in -blocksonly mode,
       and unlimited transaction announcements), mempool (allow
       requesting BIP35 mempool contents), download (allow getheaders
       during IBD, no disconnect after maxuploadtarget limit), addr
       (responses to GETADDR avoid hitting the cache and contain random
       records with the most up-to-date info). Specify multiple
       permissions separated by commas (default:
       download,noban,mempool,relay). Can be specified multiple times.

  -whitelist=<[permissions@]IP address or network>
       Add permission flags to the peers connecting from the given IP address
       (e.g. 1.2.3.4) or CIDR-notated network (e.g. 1.2.3.0/24). Uses
       the same permissions as -whitebind. Can be specified multiple
       times.
BitMaxz
Legendary
*
Offline Offline

Activity: 3248
Merit: 2965


Block halving is coming.


View Profile WWW
December 09, 2022, 11:32:29 PM
 #3

Have you tried to add addnode=192.168.0.X:8333 under your Bitcoin.conf?
X should be replaced with your full node IP where you want to connect to. You can also use the RPC command bitcoin-cli to addnode check this link below it will force you to connect to that node.

- https://developer.bitcoin.org/reference/rpc/addnode.html

You can also use connect=192.168.0.X:8333 and put it in your bitcoin.conf same goes for the RPC command as a reference link above.

█▀▀▀











█▄▄▄
▀▀▀▀▀▀▀▀▀▀▀
e
▄▄▄▄▄▄▄▄▄▄▄
█████████████
████████████▄███
██▐███████▄█████▀
█████████▄████▀
███▐████▄███▀
████▐██████▀
█████▀█████
███████████▄
████████████▄
██▄█████▀█████▄
▄█████████▀█████▀
███████████▀██▀
████▀█████████
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
c.h.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
▀▀▀█











▄▄▄█
▄██████▄▄▄
█████████████▄▄
███████████████
███████████████
███████████████
███████████████
███░░█████████
███▌▐█████████
█████████████
███████████▀
██████████▀
████████▀
▀██▀▀
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 12:01:00 PM
 #4

You can try to use:

Code:
  -whitebind=<[permissions@]addr>
       Bind to the given address and add permission flags to the peers
       connecting to it. Use [host]:port notation for IPv6. Allowed
       permissions: bloomfilter (allow requesting BIP37 filtered blocks
       and transactions), noban (do not ban for misbehavior; implies
       download), forcerelay (relay transactions that are already in the
       mempool; implies relay), relay (relay even in -blocksonly mode,
       and unlimited transaction announcements), mempool (allow
       requesting BIP35 mempool contents), download (allow getheaders
       during IBD, no disconnect after maxuploadtarget limit), addr
       (responses to GETADDR avoid hitting the cache and contain random
       records with the most up-to-date info). Specify multiple
       permissions separated by commas (default:
       download,noban,mempool,relay). Can be specified multiple times.

  -whitelist=<[permissions@]IP address or network>
       Add permission flags to the peers connecting from the given IP address
       (e.g. 1.2.3.4) or CIDR-notated network (e.g. 1.2.3.0/24). Uses
       the same permissions as -whitebind. Can be specified multiple
       times.

So using whitelist=127.0.0.1 would allow localhost not to be counted amongst the connections subjected to maxconnections, correct? Thanks!
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 01:28:31 PM
 #5

Have you tried to add addnode=192.168.0.X:8333 under your Bitcoin.conf?
X should be replaced with your full node IP where you want to connect to. You can also use the RPC command bitcoin-cli to addnode check this link below it will force you to connect to that node.

- https://developer.bitcoin.org/reference/rpc/addnode.html

You can also use connect=192.168.0.X:8333 and put it in your bitcoin.conf same goes for the RPC command as a reference link above.

I don't think this is what I need because I do not want to connect to a new node, instead I want to ensure that local (running on localhost) services that need access to the 8333 port of my full node can always connect to it.
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 10, 2022, 02:20:56 PM
 #6

You can try to use:

Code:
  -whitebind=<[permissions@]addr>
       Bind to the given address and add permission flags to the peers
       connecting to it. Use [host]:port notation for IPv6. Allowed
       permissions: bloomfilter (allow requesting BIP37 filtered blocks
       and transactions), noban (do not ban for misbehavior; implies
       download), forcerelay (relay transactions that are already in the
       mempool; implies relay), relay (relay even in -blocksonly mode,
       and unlimited transaction announcements), mempool (allow
       requesting BIP35 mempool contents), download (allow getheaders
       during IBD, no disconnect after maxuploadtarget limit), addr
       (responses to GETADDR avoid hitting the cache and contain random
       records with the most up-to-date info). Specify multiple
       permissions separated by commas (default:
       download,noban,mempool,relay). Can be specified multiple times.

  -whitelist=<[permissions@]IP address or network>
       Add permission flags to the peers connecting from the given IP address
       (e.g. 1.2.3.4) or CIDR-notated network (e.g. 1.2.3.0/24). Uses
       the same permissions as -whitebind. Can be specified multiple
       times.

So using whitelist=127.0.0.1 would allow localhost not to be counted amongst the connections subjected to maxconnections, correct? Thanks!

I looked at my config and I already had whitelist=bloomfilter@127.0.0.1 ...
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
December 13, 2022, 12:08:00 PM
 #7

So using whitelist=127.0.0.1 would allow localhost not to be counted amongst the connections subjected to maxconnections, correct? Thanks!

IIRC, using it while having maxconnections set up, will reserve any local service(Electrs) that I used to keep still connected.

I looked at my config and I already had whitelist=bloomfilter@127.0.0.1 ...

What kind of local services you are trying to connect to? Do you have any logs when it rejects the connection attempt?

And have you tried to include all the [permissions@] in the config?
Jodmapht (OP)
Member
**
Offline Offline

Activity: 66
Merit: 21


View Profile
December 13, 2022, 02:41:15 PM
 #8

So using whitelist=127.0.0.1 would allow localhost not to be counted amongst the connections subjected to maxconnections, correct? Thanks!

IIRC, using it while having maxconnections set up, will reserve any local service(Electrs) that I used to keep still connected.

I looked at my config and I already had whitelist=bloomfilter@127.0.0.1 ...

What kind of local services you are trying to connect to? Do you have any logs when it rejects the connection attempt?

And have you tried to include all the [permissions@] in the config?

Services such as Bisq. In the log I was seeing that the connection to the node kept getting disconnected in a loop and it was unable to sync.It started to work again after I restart bitcoind. However I would prefer not having to restart bitcoind. Thanks!
vv181
Legendary
*
Offline Offline

Activity: 1932
Merit: 1273


View Profile
December 15, 2022, 03:15:40 PM
 #9

I want to ensure that local (running on localhost) services that need access to the 8333 port of my full node can always connect to it.

Just to make sure, by your saying of localhost, does that mean Bisq and bitcoind are running on the same device(Raspberry Pi)? Or did you mean both applications are on the same network (LAN)?
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!