Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: Geremia on July 02, 2015, 02:36:07 AM



Title: no IPv6 peers connecting to my node
Post by: Geremia on July 02, 2015, 02:36:07 AM
`getnetworkinfo` says IPv6 is working on my node:
Code:
{
"name" : "ipv6",
"limited" : false,
"reachable" : true,
"proxy" : "127.0.0.1:9050"
}
Yet why don't I get any IPv6 peers connecting to my node? Sometimes I get many connecting to it, but right now I have only IPv4 peers.

(cf. the related Bitcoin StackExchange question (https://bitcoin.stackexchange.com/q/38365/4334))


Title: Re: no IPv6 peers connecting to my node
Post by: KriszDev on July 02, 2015, 07:36:29 AM
The proxy ip is ipv4 and you can't make ipv6 through ipv4.


Title: Re: no IPv6 peers connecting to my node
Post by: Newar on July 02, 2015, 08:49:03 AM
Can you use addnode= adding one manually? They are some listed on https://getaddr.bitnodes.io/.


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 02, 2015, 02:04:21 PM
The proxy ip is ipv4 and you can't make ipv6 through ipv4.
I'm not trying to. I don't know why it shows my Tor proxy in the IPv6 section. It's shown this before, even when I've had IPv6 peers.


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 02, 2015, 02:07:54 PM
Can you use addnode= adding one manually? They are some listed on https://getaddr.bitnodes.io/.
Yes, I can add them, but `getaddednodeinfo true` returns
Code:
"connected" : "false"
for all of them.


Title: full `getnetworkinfo` output
Post by: Geremia on July 02, 2015, 02:17:56 PM
Here's the full output of `getnetworkinfo` (with my IPv6 address Xed out for privacy)
Code:
{
"version" : 100200,
"subversion" : "/Satoshi:0.10.2/",
"protocolversion" : 70002,
"localservices" : "0000000000000001",
"timeoffset" : -1,
"connections" : 44,
"networks" : [
{
"name" : "ipv4",
"limited" : false,
"reachable" : true,
"proxy" : "127.0.0.1:9050"
},
{
"name" : "ipv6",
"limited" : false,
"reachable" : true,
"proxy" : "127.0.0.1:9050"
},
{
"name" : "onion",
"limited" : false,
"reachable" : true,
"proxy" : "127.0.0.1:9050"
}
],
"relayfee" : 0.00001000,
"localaddresses" : [
{
"address" : "XXXX:XXX:XXXX:XX:XXX:XXXX:XXXX:XXXX",
"port" : 8333,
"score" : 1
}
]
}
I'm able to `ping6` active IPv6 nodes from Bitnodes.io, and `getnetworkinfo` says IPv6 is reachable. Why don't I have any IPv6 peers, then?

I have
Code:
onion=127.0.0.1:9050
set in my bitcoin.conf; however, I do not want non-Tor IPv4 or IPv6 going through it, yet why does it claim to be using the proxy for all protocols?


Title: Re: no IPv6 peers connecting to my node
Post by: Foxpup on July 03, 2015, 01:21:48 AM
I have
Code:
proxy=127.0.0.1:9050
set in my bitcoin.conf; however, I do not want non-Tor IPv4 or IPv6 going through it, yet why does it claim to be using the proxy for all protocols?
Um, because that's what the proxy option is for? If you want to use Tor just to reach .onion nodes, and not as a proxy for other traffic, use the onion option instead, eg, onion=127.0.0.1:9050. (Naturally, connections to non-onion nodes will not be anonymised if you do this.)


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 03, 2015, 03:21:02 AM
I have
Code:
proxy=127.0.0.1:9050
set in my bitcoin.conf; however, I do not want non-Tor IPv4 or IPv6 going through it, yet why does it claim to be using the proxy for all protocols?
Um, because that's what the proxy option is for? If you want to use Tor just to reach .onion nodes, and not as a proxy for other traffic, use the onion option instead, eg, onion=127.0.0.1:9050. (Naturally, connections to non-onion nodes will not be anonymised if you do this.)
Sorry, I meant to say:
Code:
onion=127.0.0.1:9050
Not having "--proxy" defined in my bitcoin.conf still makes `getnetworkinfo` show all the protocols using the the onion proxy.

I'm confused about "--onion" and "--proxy". Are these options for incoming connections, outgoing connections, or both?


Title: Re: no IPv6 peers connecting to my node
Post by: Foxpup on July 03, 2015, 04:10:45 AM
Sorry, I meant to say:
Code:
onion=127.0.0.1:9050
Not having "--proxy" defined in my bitcoin.conf still makes `getnetworkinfo` show all the protocols using the the onion proxy.
It shouldn't. I can't explain that. Or why (as I've just noticed) you've got 44 connections apparently over Tor. That can't be right.

I'm confused about "--onion" and "--proxy". Are these options for incoming connections, outgoing connections, or both?
Both, although you obviously can't get incoming connections over IPv4/IPv6 without a public IP address, which you don't have if you're using Tor as a proxy. The only way you can get incoming connections through Tor is if you're hosting a hidden service.


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 03, 2015, 04:44:25 AM
Or why (as I've just noticed) you've got 44 connections apparently over Tor.
No, I only have 2 Onion nodes connected. The rest are IPv4.


Title: Re: no IPv6 peers connecting to my node
Post by: Foxpup on July 03, 2015, 05:04:28 AM
No, I only have 2 Onion nodes connected. The rest are IPv4.
If your IPv4 network has incoming connections, you're definitely not using Tor as an IPv4 proxy. As I said, I don't know why it says you are.


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 04, 2015, 03:04:51 AM
No, I only have 2 Onion nodes connected. The rest are IPv4.
If your IPv4 network has incoming connections, you're definitely not using Tor as an IPv4 proxy. As I said, I don't know why it says you are.
This may help; my bitcoin.conf file contains these flags:
Code:
min=1
server=1
proxy=127.0.0.1:9050
onion=127.0.0.1:9050
listen=1
discover=1


Title: Re: no IPv6 peers connecting to my node
Post by: Foxpup on July 04, 2015, 02:38:48 PM
This may help; my bitcoin.conf file contains these flags:
Code:
min=1
server=1
proxy=127.0.0.1:9050
onion=127.0.0.1:9050
listen=1
discover=1
Ah. I think listen and discover allows connections to bypass the proxy (I'm not 100% sure how these options interact).


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 04, 2015, 05:41:34 PM
This may help; my bitcoin.conf file contains these flags:
Code:
min=1
server=1
proxy=127.0.0.1:9050
onion=127.0.0.1:9050
listen=1
discover=1
Ah. I think listen and discover allows connections to bypass the proxy (I'm not 100% sure how these options interact).
Well, "--discover=1" is redundant when "--listen=1".

Code:
-listen                Accept connections from outside (default: 1 if no -proxy or -connect)

Also, I have to specify "--discover=1", otherwise I get this error in my debug log:
Code:
AppInit2 : parameter interaction: -proxy set -> setting -discover=0


Title: Re: no IPv6 peers connecting to my node
Post by: Geremia on July 04, 2015, 06:18:31 PM
The issue was that bitcoind was discovering my wrong IPv6 address. (It mistook my link IPv6 address for my public one.) I turned off discover and set my IPv4 and IPv6 addresses manually with "--externalip".