Author

Topic: Wrong implementation - Bitcoind does not use externalip for outgoing connection (Read 532 times)

full member
Activity: 179
Merit: 131
I have just raised this issue on github as below.

Quote
I have 4 IPv6 addresses on the eth0 interface of my VPS. I have set routings of all those IPv6 addresses using "ip -6 rule", "ip -6 route" and their corresponding fwmark label on ip6tables. I want all bitcoind packets for both outgoing and incoming connections to use one specific IPv6 address which is not the default outgoing IPv6 address. I set the externalip to that specific IPv6 address and the discover=0.

However, bitcoind keeps using the default IPv6 address for outgoing connection. I can force the outgoing packets from bitcoind to go out to its specific IPv6 address using ip6tables SNAT. But that is an ugly workaround. So I have no choice than to set the IPv6 address of bitcoind as the default outgoing IPv6 address.

What is the point to provide the possibility to set the external IP address, i.e. externalip parameter, if it is not being used for the outgoing connection? It does not really make sense if the externalip parameter is only being used for the incoming connection, because all peers only know how to connect to my full node base on the IP address that my full node uses for the outgoing connection. So if my full node is connecting to all peers with different IP address than the one it is expecting to receive the incoming connection, my full node will never have peers that can connect to it as the port 8333 is only opened on its specific IP address.

I saw similar issues on github, but I don't see any good answers for that. Does anybody have a workaround or a patch for bitcoind, so that bitcoind uses the externalip that we set for outgoing connection?
Jump to: