How to trigger port for Bitcoin client (e.g. 8333)

1

According to this it's possible to have incoming connections to Bitcoin client by forwarding port 8333 on the router. I was wondering if there is some specific port range Bitcoin Core uses for making outgoing connections which could be used as a triggering rule? This way when the client is not running, port would be closed, plus it could be used by different machines behind the router without configuration changes (I know I could forward different ports to different machines and then change the incoming port in client configs)

EDIT:

@NateEldredge is right.

My current setup is as follow:

Rule name: Bitcoin Triggered range: 8333-8333 Forwarded range: 8333-8333

If Bitcoin Core is running the port is open (according to http://www.canyouseeme.org/). If it's closed the port is closed too.

The only catch is it won't work if all 8 outgoing connections will use non default port but it shouldn't happen too often if ever.

MeTTeO

Posted 2015-10-20T16:05:25.310

Reputation: 113

You could look for outgoing connections with destination port 8333, if your router supports that.Nate Eldredge 2015-10-20T16:13:15.547

@NateEldredge My router doesn't specify if it expects source or destination port as triggering port but it seems it's the second case and you are right. Please convert your comment to an answer so I can accept it.MeTTeO 2015-10-20T16:26:59.740

Answers

2

Bitcoin Core doesn't seem to have an option to specify the source port for outgoing connections, so you probably can't assume anything about the source port.

However, if possible, you could configure your router to look for outgoing connections with destination port 8333, which will probably be the port used by most peers.

Nate Eldredge

Posted 2015-10-20T16:05:25.310

Reputation: 21 420