Author

Topic: Two bitcoin clients behind NAT (Read 2896 times)

administrator
Activity: 5222
Merit: 13032
April 07, 2011, 01:40:31 PM
#4
You'll send double the number of addr messages, which could help addr propagation slightly. Sending more addr messages has diminishing returns, as peers around you will block your duplicate messages. The main bootstrap method is IRC, though, and having two nicks on IRC doesn't give you any advantage.

In any case, it won't cause any problem for you or the network, aside from unnecessary resource usage.

Second, if I have the NAT'd client connect to another client on my local network (e.g. 192.168.*.*) won't the client see that as an invalid address and do its normal thing anyway?

No.
newbie
Activity: 9
Merit: 0
April 07, 2011, 12:59:51 PM
#3
Please, dont wast network resources having two clients connect outside of your network.  The best way to do this is to run one client with the proper port forwarding, and then the second using the -connect= parameter, which limits connections to that particular peer (add your main node's local IP).

Ok, first, how is this wasting network resources.  Are you meaning that the NAT'd client is pointless because it is only connecting to 8 other nodes?  If that is the case, isn't every NAT'd client a waste?

Second, if I have the NAT'd client connect to another client on my local network (e.g. 192.168.*.*) won't the client see that as an invalid address and do its normal thing anyway?

Thanks,

Hazzey
hero member
Activity: 755
Merit: 515
April 07, 2011, 12:17:32 PM
#2
Please, dont wast network resources having two clients connect outside of your network.  The best way to do this is to run one client with the proper port forwarding, and then the second using the -connect= parameter, which limits connections to that particular peer (add your main node's local IP).

What happens with the list of addresses that the network passes around?  My thinking is that since both of my computers appear to have the same global IP address, they are assumed to be the same computer. 
Yep, pretty much.

As an example, the NAT'd client connects out to its 8 other clients.  The NAT'd client's IP address gets added to the list of address that gets shared. When that address gets passed to another client that wants to connect, that client tries to connect to the IP address that it has.  Since the firewall/NAT forwards port 8333 to my second client, this client then receives the connection attempt and processes it.  The outside bitcoin client doesn't know the difference and is happy.
Yea, in theory it should work just fine, you would be connecting to the other node on your network, no problems.  In reality, this would probably never happen (I dont think there is any "connecting to myself" checks, but I don't know) as there are so many nodes.

My additional thought is that once the addresses of my two clients (they are the same IP) get passed around, they merge into one anyway and they client that has the port forward basically "becomes" the both of them.
Yea, pretty much.
newbie
Activity: 9
Merit: 0
April 07, 2011, 11:32:20 AM
#1
In my situation, I have two separate computers running the bitcoin client.  One has the firewall/NAT forwarding port 8333 to it and the other one is just behind the NAT.

What happens with the list of addresses that the network passes around?  My thinking is that since both of my computers appear to have the same global IP address, they are assumed to be the same computer. 

As an example, the NAT'd client connects out to its 8 other clients.  The NAT'd client's IP address gets added to the list of address that gets shared. When that address gets passed to another client that wants to connect, that client tries to connect to the IP address that it has.  Since the firewall/NAT forwards port 8333 to my second client, this client then receives the connection attempt and processes it.  The outside bitcoin client doesn't know the difference and is happy.

Is that how it would work?

This doesn't really make too much difference in the end, because the NAT'd client would only have ever connected out its 8 times anyway.  Would this in some way increase the number of connections that the port forwarded client gets?

My additional thought is that once the addresses of my two clients (they are the same IP) get passed around, they merge into one anyway and they client that has the port forward basically "becomes" the both of them.

Thanks for any of your thoughts.

Hazzey
Jump to: