Author

Topic: Setting up multiple bitcoin machines behind NAT (Read 20208 times)

member
Activity: 92
Merit: 10
You can only set up your NAT to port-forward to one of the computers.



For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them.  The first two are run normally, the rest are run like:
bitcoin -connect= -connect=

I agree with the first statement (you can only forward the port to one computer).

Therefore I do not understand the second statement. How does this achieve redundancy? Only one of the two will receive forwarded traffic. If that one goes down then you've lost the connection (AFAIK).

Am I being dumb?

I can think of how it can be redundant, if the second connect command is connecting to a known, usually running, node Outside your own network, a public IP address.  There, redundancy achieved.
newbie
Activity: 6
Merit: 0
You can only set up your NAT to port-forward to one of the computers.



For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them.  The first two are run normally, the rest are run like:
bitcoin -connect= -connect=

I agree with the first statement (you can only forward the port to one computer).

Therefore I do not understand the second statement. How does this achieve redundancy? Only one of the two will receive forwarded traffic. If that one goes down then you've lost the connection (AFAIK).

Am I being dumb?
full member
Activity: 182
Merit: 100
I have two copies running on two computers behind the same router with both systems pointing to the same 8333 port.  Only one computer gets more than 8 connections, but why cant both systems use the same port? 

P.S. If anyone wants to generate a transaction or two they can send .01 to  1C4eBje7vpxuE2deewfiNj8zgoiF4jpV4C    I will send it back at you, provide me your address.  Have fun!

Jim   Smiley

Both systems can't receive messages from the outside network.  The router can only forward the packets coming in on port 8333 to one of the computers.  However, if the two are connected to each other (which you can ensure with the -connect option mentioned above), the messages will be forwarded to the other node by the one that does receive it.
newbie
Activity: 2
Merit: 0
I have two copies running on two computers behind the same router with both systems pointing to the same 8333 port.  Only one computer gets more than 8 connections, but why cant both systems use the same port? 

P.S. If anyone wants to generate a transaction or two they can send .01 to  1C4eBje7vpxuE2deewfiNj8zgoiF4jpV4C    I will send it back at you, provide me your address.  Have fun!

Jim   Smiley
hero member
Activity: 532
Merit: 505
they'll both generate,
only difference is the number of connected nodes, it'll be limited to 8 on all un-forwarded clients.
legendary
Activity: 860
Merit: 1021
Sorry for digging out this thread, but what if I have two machines running bitcoin behind a NAT, port 8333 forwarded to one of these and both bitcoin clients are generating coins. Is the "unforwarded cleint" even able to generate coins ? Do they get send to the forwarded client ?
full member
Activity: 132
Merit: 101
Right now there isn't a port number setting to do that.  It's a feature yet to be implemented.

So, if I somehow I forwarded port router:8333 to bitcoinhost1:8333 and router:8334 to bitcoinhost2:8333, we get undefined behavior?
Because that seems like trivial to me, to keep track of port numbers in any p2p app.

Sorry about that, must've been drunk when I wrote that. Huh
founder
Activity: 364
Merit: 6472
At the moment, it always assumes the incoming port is 8333, so it would tell other bitcoin nodes to connect to router:8333 even if you're redirecting from another port number.

I'm not in a big hurry to fix this because I can't think of any benefit to having more than one incoming connection port.  If you're providing one incoming port, then you've done your bit to help the network.  Having two incoming ports to the same person doesn't help redundancy.

If you have many computers, then using the -connect switch on most of them to connect locally makes more sense.
full member
Activity: 132
Merit: 101
Right now there isn't a port number setting to do that.  It's a feature yet to be implemented.

So, if I somehow I forwarded port router:8333 to bitcoinhost1:8333 and router:8334 to bitcoinhost2:8333, we get undefined behavior?
Because that seems like trivial to me, to keep track of port numbers in any p2p app.
founder
Activity: 364
Merit: 6472
Right now there isn't a port number setting to do that.  It's a feature yet to be implemented.  You can only set up your NAT to port-forward to one of the computers.  (I said something earlier about NAT port translation, but that wouldn't work, other nodes wouldn't know to connect to that port)

If you want, as a small optimization, you could run the rest of your computers as:
bitcoin -connect=

so they get all their network communication from the first computer and don't all connect over the net individually for the same information.  This saves bandwidth, although it doesn't use much bandwidth to begin with, so it wouldn't really matter unless you had tons of computers.

For redundancy in case the first computer goes down, you could have two that connect out and the rest connect to both of them.  The first two are run normally, the rest are run like:
bitcoin -connect= -connect=
newbie
Activity: 1
Merit: 0
Hello,

well the title says it all. I want to set up multiple bitcoin machines behind NAT.
For this it reason would be nice, if one could choose an other port than 8333, which I guess would have other nice side effects. Maybe someone uses this port for something else or maybe it isn't possible to set up port forwarding to this port for one reason or another.

Or is there an other way one should go?

Greetings,
foobar
Jump to: