Pages:
Author

Topic: Running on a port other than 8333 (Read 26218 times)

newbie
Activity: 42
Merit: 0
March 24, 2017, 08:48:35 PM
#45
yeah, it's more like... if it's a nonstandard port, mark it as such, and connect much less frequently....ie: only one nonstandard port connection per day... with a doubling backoffs on failure, and random time to attempt.   this would allow nonstandard ports to exist.   any web server can handle an extra 10k requests evenly spread out through the day, so no risk of ddos.   if this seems to work, and it's useful, and it doesn't turn into a mosh pit on testnet, the levels can be slowly raised to 10 nonstandard peers per day, or whatever.
full member
Activity: 380
Merit: 103
Developer and Consultant
February 23, 2017, 09:41:17 PM
#44
Great, thanks!!
legendary
Activity: 2053
Merit: 1356
aka tonikt
February 23, 2017, 08:33:37 PM
#43
It's in net.cpp

Look for:

Code:
// do not allow non-default ports, unless after 50 invalid addresses selected already
if (addr.GetPort() != Params().GetDefaultPort() && nTries < 50)
    continue;
legendary
Activity: 2053
Merit: 1356
aka tonikt
February 23, 2017, 08:18:28 PM
#42
It doesn't matter which post you select, because at some point in time (around adding the addr messages ad removing IRC) the algo in the bitcoin core for selecting peers to connect to has been fucked up. And ever since then the bitcoin core node intentionally discards peers that are listening at non-default port.

I raised this issue once, but the answer was that it wasn't a bug, but a security feature.
Great feature, BTW - it makes me feel so much more secured! Smiley

Anyway, if you setup you node to use a different port, you only get incoming connections from non bitcoin core nodes.
Because the bitcoin code node is fucked up and nobody gives a shit about it.

Can you link me to the section of code that discards the peers, i'd like to submit a patch toc change that aspect. Users should be allowed to use whatever port they desire.
That was my thinking from the very beginning. Also because now it's very easy to block bitcoin just by blocking tcp connections on port 8333

Changing it is easy - you just need to remove a bit of code...
But I remember gmaxwell saying that they wouldn't change it, because it would allow for someone to use bitcoin nodes for conducting DDoS attacks on internet servers Smiley

Not sure where it is now - the code is changing all the time... give me a sec.
full member
Activity: 380
Merit: 103
Developer and Consultant
February 23, 2017, 08:07:14 PM
#41
It doesn't matter which post you select, because at some point in time (around adding the addr messages ad removing IRC) the algo in the bitcoin core for selecting peers to connect to has been fucked up. And ever since then the bitcoin core node intentionally discards peers that are listening at non-default port.

I raised this issue once, but the answer was that it wasn't a bug, but a security feature.
Great feature, BTW - it makes me feel so much more secured! Smiley

Anyway, if you setup you node to use a different port, you only get incoming connections from non bitcoin core nodes.
Because the bitcoin code node is fucked up and nobody gives a shit about it.

Can you link me to the section of code that discards the peers, i'd like to submit a patch toc change that aspect. Users should be allowed to use whatever port they desire.
legendary
Activity: 2053
Merit: 1356
aka tonikt
June 27, 2014, 12:11:25 PM
#40
It doesn't matter which post you select, because at some point in time (around adding the addr messages ad removing IRC) the algo in the bitcoin core for selecting peers to connect to has been fucked up. And ever since then the bitcoin core node intentionally discards peers that are listening at non-default port.

I raised this issue once, but the answer was that it wasn't a bug, but a security feature.
Great feature, BTW - it makes me feel so much more secured! Smiley

Anyway, if you setup you node to use a different port, you only get incoming connections from non bitcoin core nodes.
Because the bitcoin code node is fucked up and nobody gives a shit about it.
newbie
Activity: 20
Merit: 0
June 27, 2014, 10:38:40 AM
#39
You need to specify the -rpcport of the instance you want to stop (probably 7332).

yep, hence using the -datadir switch to point to the secondary bitcoin.conf file... thank you.


Hi guys, I know this thread is very old but it is something I am experiencing right now.

The example conf here is for old versions and I was wondering if you can post one that is suitable for 0.9 +
hero member
Activity: 812
Merit: 1000
July 31, 2011, 06:02:34 PM
#38
You need to specify the -rpcport of the instance you want to stop (probably 7332).

yep, hence using the -datadir switch to point to the secondary bitcoin.conf file... thank you.
hero member
Activity: 755
Merit: 515
July 31, 2011, 11:12:26 AM
#37
You need to specify the -rpcport of the instance you want to stop (probably 7332).
hero member
Activity: 812
Merit: 1000
July 31, 2011, 10:08:14 AM
#36
so i was able to get this working, one instance running on 8333/8332 and another working on 7333/7332.

But when I tried to stop the 2nd instance, it stopped the first one instead!

/web/sites/.bitcoin1/bitcoind <- this runs on the default ports

/web/sites/.bitcoin2/bitcoind -datadir=/web/sites/.bitcoin2/ <- this runs on 7333

/web/sites/.bitcoin2/bitcoind stop <- this command stops the bitcoin1 instance!

Use

/web/sites/.bitcoin2/bitcoind -datadir=/web/sites/.bitcoin2/ stop


Thanks, will try that...

Funny I tried that switch before, but I put it after the 'stop':

/web/sites/.bitcoin2/bitcoind stop -datadir=/web/sites/.bitcoin2/ <- doesn't work Tongue

didn't even think to put it first.
hero member
Activity: 812
Merit: 1022
No Maps for These Territories
July 31, 2011, 10:04:57 AM
#35
so i was able to get this working, one instance running on 8333/8332 and another working on 7333/7332.

But when I tried to stop the 2nd instance, it stopped the first one instead!

/web/sites/.bitcoin1/bitcoind <- this runs on the default ports

/web/sites/.bitcoin2/bitcoind -datadir=/web/sites/.bitcoin2/ <- this runs on 7333

/web/sites/.bitcoin2/bitcoind stop <- this command stops the bitcoin1 instance!

Use

/web/sites/.bitcoin2/bitcoind -datadir=/web/sites/.bitcoin2/ stop
hero member
Activity: 812
Merit: 1000
July 31, 2011, 09:57:11 AM
#34
so i was able to get this working, one instance running on 8333/8332 and another working on 7333/7332.

But when I tried to stop the 2nd instance, it stopped the first one instead!

/web/sites/.bitcoin1/bitcoind <- this runs on the default ports

/web/sites/.bitcoin2/bitcoind -datadir=/web/sites/.bitcoin2/ <- this runs on 7333

/web/sites/.bitcoin2/bitcoind stop <- this command stops the bitcoin1 instance!
hero member
Activity: 812
Merit: 1000
July 29, 2011, 09:26:55 AM
#33

honestly i'd like to upgrade but i still haven't found a solution to the missing glibcxx_3.4.11 yet.

/usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.11' not found
/lib/i686/cmov/libc.so.6: version `GLIBC_2.11' not found
hero member
Activity: 755
Merit: 515
hero member
Activity: 812
Merit: 1000
July 29, 2011, 07:47:42 AM
#31
maybe i'm just misunderstanding how this is supposed to work...

but can anyone tell me what mainline version number this was first added to? it's not working with 0.3.20 but i guess i should maybe be upgrading anyway.
hero member
Activity: 812
Merit: 1000
July 29, 2011, 07:03:42 AM
#30
Why are you trying to run 2 bitcoinds?

Isn't the answer to that question in the OP?

(to run two separate websites/businesses/wallets on one server at the same time)
hero member
Activity: 755
Merit: 515
July 29, 2011, 06:57:28 AM
#29
Why are you trying to run 2 bitcoinds?  There is no reason to run 2 bitcoinds on the public network.
hero member
Activity: 812
Merit: 1000
July 29, 2011, 06:21:11 AM
#28
thanks matt, i have more questions now hopefully someone can help Smiley

c) do i physically need 2 copies of the bitcoind bin? i'm not much of a linux guy but i tried to nohup the 2nd instance of bitcoind from the same physical program file and it doesn't appear to have launched the 2nd process.

d) i was going to ask how to just stop one instance and not both, but if you need 2 physical copies of bitcoind then a simple stop command would make sense.
hero member
Activity: 755
Merit: 515
July 29, 2011, 06:09:33 AM
#27
a) is this information still current
Yes
b) has this functionality made it into the default client, or i still need to find a patched version?
Mainline.
hero member
Activity: 812
Merit: 1000
July 29, 2011, 05:52:52 AM
#26
I've been working on adding -port= / -rpcport=  command line / config file options to bitcoin.

Usage looks like this:
Code:
$ ./bitcoind getbalance  # The TEST network Faucet bitcoind
40616.66159265000
$ ./bitcoind -datadir=/home/bitcoin/.bitcoinTEST2 getbalance
1000.000000000000
$ cat /home/bitcoin/.bitcoinTEST2/bitcoin.conf
rpcpassword=.....
port=18666
rpcport=18665

Patches are at http://pastebin.com/2e4hfXSS; I've only tested on Linux so far, anybody willing to try this on Windows?

a) is this information still current, or is there some more up-to-date thread i should be reading instead? (i notice there is an rpcport option in the example bitcoin.conf going around, but no 'port' option).

b) has this functionality made it into the default client, or i still need to find a patched version?

thank you.
Pages:
Jump to: