Bitcoin Forum
December 12, 2024, 05:34:35 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Setting up multiple bitcoin machines behind NAT  (Read 20243 times)
foobar (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
February 16, 2010, 12:35:25 AM
 #1

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
satoshi
Founder
Sr. Member
*
Offline Offline

Activity: 364
Merit: 7426


View Profile
February 16, 2010, 01:34:56 AM
Merited by Foxpup (3)
 #2

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=<the IP of the first computer>

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=<IP1> -connect=<IP2>
Xunie
Full Member
***
Offline Offline

Activity: 132
Merit: 101



View Profile
April 08, 2010, 08:06:37 PM
 #3

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.

Ignore this: 734d417914faa443d74e8205f639dfb0f79fdc44988ecae44db31e5636525afe

Caffeinism -- a toxic condition caused by excessive ingestion of coffee and other caffeine-containing beverage.
satoshi
Founder
Sr. Member
*
Offline Offline

Activity: 364
Merit: 7426


View Profile
May 16, 2010, 11:56:03 PM
 #4

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.
Xunie
Full Member
***
Offline Offline

Activity: 132
Merit: 101



View Profile
May 17, 2010, 07:11:08 PM
 #5

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

Ignore this: 734d417914faa443d74e8205f639dfb0f79fdc44988ecae44db31e5636525afe

Caffeinism -- a toxic condition caused by excessive ingestion of coffee and other caffeine-containing beverage.
SmokeTooMuch
Legendary
*
Offline Offline

Activity: 860
Merit: 1026


View Profile
October 11, 2010, 09:47:27 PM
 #6

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 ?

Date Registered: 2009-12-10 | I'm using GPG, pm me for my public key. | Bitcoin on Reddit: https://www.reddit.com/r/btc
BitLex
Hero Member
*****
Offline Offline

Activity: 532
Merit: 505


View Profile
October 11, 2010, 09:55:30 PM
 #7

they'll both generate,
only difference is the number of connected nodes, it'll be limited to 8 on all un-forwarded clients.

BlueBird
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
February 27, 2011, 03:00:39 AM
 #8

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
FooDSt4mP
Full Member
***
Offline Offline

Activity: 182
Merit: 100


View Profile
February 27, 2011, 05:48:47 AM
 #9

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  <a href='bitcoin:?addr=1C4eBje7vpxuE2deewfiNj8zgoiF4jpV4C' id='lnk01C4eBje7vpxuE2deewfiNj8zgoiF4jpV4C'>1C4eBje7vpxuE2deewfiNj8zgoiF4jpV4C</a>    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.

As we slide down the banister of life, this is just another splinter in our ass.
Dominic Sayers
Newbie
*
Offline Offline

Activity: 6
Merit: 0



View Profile
May 18, 2011, 12:07:13 PM
 #10

You can only set up your NAT to port-forward to one of the computers.

<snip>

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=<IP1> -connect=<IP2>

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?
krepta3000
Member
**
Offline Offline

Activity: 92
Merit: 10


View Profile
June 26, 2011, 02:04:40 PM
 #11

You can only set up your NAT to port-forward to one of the computers.

<snip>

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=<IP1> -connect=<IP2>

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.
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!