Git Product home page Git Product logo

Comments (6)

jonatack avatar jonatack commented on September 26, 2024

Can you post the result of running ./src/bitcoin-cli getnetworkinfo on your machine (with the same modified IPs as above)? This is the information that -netinfo uses to fetch the local addresses.

from bitcoin.

lcharles123 avatar lcharles123 commented on September 26, 2024

root@debianpc:~# bcli getnetworkinfo
{
"version": 270000,
"subversion": "/Satoshi:27.0.0/",
"protocolversion": 70016,
"localservices": "0000000000000c09",
"localservicesnames": [
"NETWORK",
"WITNESS",
"NETWORK_LIMITED",
"P2P_V2"
],
"localrelay": true,
"timeoffset": -8,
"networkactive": true,
"connections": 68,
"connections_in": 58,
"connections_out": 10,
"networks": [
{
"name": "ipv4",
"limited": false,
"reachable": true,
"proxy": "",
"proxy_randomize_credentials": false
},
{
"name": "ipv6",
"limited": true,
"reachable": false,
"proxy": "",
"proxy_randomize_credentials": false
},
{
"name": "onion",
"limited": false,
"reachable": true,
"proxy": "127.0.0.1:9050",
"proxy_randomize_credentials": true
},
{
"name": "i2p",
"limited": false,
"reachable": true,
"proxy": "127.0.0.1:7656",
"proxy_randomize_credentials": false
},
{
"name": "cjdns",
"limited": true,
"reachable": false,
"proxy": "",
"proxy_randomize_credentials": false
}
],
"relayfee": 0.00001000,
"incrementalfee": 0.00001000,
"localaddresses": [
{
"address": "143.22.123.17",
"port": 8333,
"score": 127
},
{
"address": "qsddczpwthdeddm3viv4brhxbbxdm5eh5ywasdfmmaefctwrrgjdw5hmid.onion",
"port": 8333,
"score": 4
},
{
"address": "awxyf6dvprtsssixojegfwjdn5xka62kpxecbwdovk23ohpqm.b32.i2p",
"port": 0,
"score": 4
}
],
"warnings": ""
}

from bitcoin.

jonatack avatar jonatack commented on September 26, 2024

Thanks @lcharles123 for the info.

"Local addresses" section of "netinfo" does not show the IPv6 addresses added using "externalip" config option. (Probably there is no announce of this addresses).

CLI -netinfo will only return the local addresses that are returned by RPC getnetworkinfo, as under the hood, -netinfo calls getnetworkinfo to fetch that info.

Of the networks getnetworkinfo returns to you, IPv6 (and CJDNS, which is an IPv6 overlay network) are not reachable, which is why -netinfo isn't showing ipv6 and cjdns columns.

Perhaps IPv6 is blocked at some level in your environment, or the IPv6 IP needs to be specified in your ssh tunnel, I don't know.

Edit: probably not the issue, but did you try using the -discover config option?

Bitnodes.io show the version string of all IPs, but after put many of the IPv6 on active monitoring, only the first one specified with "externalip" are "UP" and the others are "UNREACHABLE".

You may set multiple local addresses with -externalip, but the one bitcoind rumors to a particular peer will be the most compatible address (with some additional heuristics).

from bitcoin.

lcharles123 avatar lcharles123 commented on September 26, 2024

Edit: probably not the issue, but did you try using the -discover config option?

Yes, but the addresses are unreachable anyway in local network, because the node are IPv4 only (and behind NAT).

I guess I found the cause, because function AddLocal checks for connectivity on each -externalip entry using local interfaces, for IPv4 and others, its easy because it takes the normal way to the address. But there is no solution to reach v6 addresses on a machine v4 only without some config and external service. So a good modification on the code to allow adding the local v6 address can not be made. Or there is another way?

from bitcoin.

willcl-ark avatar willcl-ark commented on September 26, 2024

Presumably in your setup your reverse SSH is connecting via ipv4, therefore bitcoind will detect it has an "active" (localhost) ipv4 connection and decide that its external ip address must be the one you gave it via the - externalip=143.22.123.17 option.

OP reads to me that you want to have Node (A) bitcoind advertising both ipv4 and (an) ipv6 address(es) which are both reachable on Node (B), so that other nodes can connect to your node (A) via ipv4 or ipv6 on Node (B). Is that correct?

The simplest solution of all IMO, is just to advertise ipv4 and ipv6 on Node (A), have them work and be externally connectable, then simply connect Node (B) to node (A) with a single, regular ipv4 connection. Why the need to advertise phantom addresses from one node via another? Just apply the setting on the node it applies to.

In the case that you really need this other behaviour, Node (B) would have to proxy traffic from an ipv6 address to an ipv6 address on Node (A), perhaps using something like:

ssh -R [B's IPv6]:8333:[A's IPv6]:8333 user@B

At that stage it might be better/easier to investigate something like this for nginx on Node (B):

# Node (B) nginx.conf

server {
    listen 8333;  # IPv4
    listen [::]:8333 ipv6only=on; # IPv6

    location / {
        # determine which address to proxy to
        set $backend_address "";
        
        if ($remote_addr ~ ":") {
            set $backend_address "[A's IPv6 address]";
        }
        
        if ($remote_addr !~ ":") {
            set $backend_address [A's IPv4 address];
        }
        
        proxy_pass http://$backend_address:8333;
    }
}

If A cannot listen on ipv6 on your network, and you really want this setup, then you may need to forward B's IPV6 traffic to a different ipv4 port on A, and investigate using iptables (or similar) to reroute traffic from that port to an internal-only IPV6 address.

All that said, general bitcoin questions and/or support requests are best directed to the Bitcoin StackExchange or the #bitcoin IRC channel on the Libera Chat network. And I think that would be the best place for the converstation to go from here.

If you agree, I think we can close this issue at this point?

from bitcoin.

willcl-ark avatar willcl-ark commented on September 26, 2024

OK I'm going to close this for now.

Feel free to open a new issue or comment here if you are still experiencing this problem.

from bitcoin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.