IPv4, non-UPnP gateway and duniter-desktop

I am running duniter-desktop 0.80.4 on container on my hosted machine. The machine has IP 178.238.229.211 (vps3.stafverhaegen.be) and the container with duniter 10.0.7.2. I configure firewall on vps3 to NAT incoming connection to port 8999 to 10.0.7.2:8999, it does not have a UPnP server running. This configuration seems to work for other crypto nodes like bitcoin and ethereum.

I am now confused by the network confiuration. If I unselect Use UPnP in the GUI for Network Settings and then close and open duniter again UPnP is enabled again. I also thus then get an error output UPnP could not be reached . If I uncheck UPnP and just restart the server from the GUI it seems to not give this error anymore.

Given this I am not sure my peer is thus reachable from internet, in my peer list I do get mine:

G6etX2    UP    BASIC_MERKLED_API vps3.stafverhaegen 10.0.7.2 8999

Can other people check if they can see this peer ?

PS: I don’t seem to be able to configure the Public ip of my gateway in duniter-desktop.

I can see your node in Sakia :slight_smile: Probably because it uses the dns to resolve the IP first, and the IPV4 if the DNS is not resolved.

What happens from my Internet connection (cgeek.fr):

If I try to resolve the DNS, I get what you said:

$ ping vps3.stafverhaegen.be
PING vps3.stafverhaegen.be (178.238.229.211) 56(84) bytes of data.

So the problem seems to be the routing to 10.0.7.2. Is it a public IP address, or just the Docker container private address? In the UI, you can change the public IP if it is known:

But you cannot enter it manually yet in the UI. However, you can force the value by editing the file ~/.conf/duniter/duniter_default/conf.json:

{
 "port": 41859,
 "ipv4": "192.168.1.11",
 "ipv6": "2a01:e35:8ae7:8bb0:8924:32df:2132:55a3",
 "upnp": true,
 "remotehost": "linux-dev.cgeek.fr",
 "remoteipv4": "88.174.120.187",
 "remoteipv6": "2a01:e35:8ae7:8bb0:8924:32df:2132:55a3",
 "remoteport": 41859
}

Restart Duniter Desktop, and you should be done.

About UPnP however, I don’t really know what is happening to you.

10.0.0.0/8 is an unroutable network like 192.168.0.0/16 is, I could now configure it so the public IP is shown correctly.

I also edit conf file to put “upnp”: false, but after starting nw it gets overriden with “upnp”: true.

You are right, I’ve just fixed it. It will be available on 0.80.5.[quote=“Fatsie, post:4, topic:1565”]
I could now configure it so the public IP is shown correctly.
[/quote]

Are you sure? We can still see:

http://vps3.stafverhaegen.be:8999/network/peering


{
  "version": 2,
  "currency": "test_net",
  "endpoints": [
    "BASIC_MERKLED_API vps3.stafverhaegen.be 10.0.7.2 8999"
  ],
  "block": "69755-00000081A0119E71FE2F93F27A0CC9120697C2FF0FAFBEE40ECA11B224CA5CE7",
  "signature": "ck4BpVJrN7ywR4OrzHS97Rw+7IJPrw2C6utHH0Mi+o/67sBMaYfK3cIXnPo6fF6kNnCIX2AuCaYSdqRLFhzVCQ==",
  "pubkey": "G6etX2HbBTfzD4UHXM5t7i8cMH3ubYoEb6jUdqkU7p4N"
}

Also, you could set remoteipv4 parameter to empty string "" to let the DNS resolve your IPv4.

This is config shown in duniter desktop with remoteipv4 given:


With empty string it says None for public address.
In both cases 10.0.7.2 is given in the endpoints string.

Have you restarted your node now that your configuration file no more contains 10.0.7.2 as remoteipv4?

Yes, both for remoteipv4: “178.238.229.211” and remoteipv4: “”.
He seems to use the ipv4 in the endpoint string and not remoteipv4

I’m really surprised of this behavior. Anyway, I will have a look tomorrow, maybe I missed something.

Still, could you try to shutdown your node and see if it is reachable or not? Just to verify that the node you are configuring is well run alone on this configuration.

I did test it and the node was not reachable when duniter-desktop was closed in between changing the .conf file.

Upgraded to 0.81.0 and first it was still reported with 10.0.7.2 in the end point. This changed after I did a ‹ reset data and start sync › in the data window. Now it is reported with the external IP address.
This is my current config:


The problem now is that the GUI seems to report network problem although the server seems to be running fine:

A good thing is that now your node appears reachable to us:

But few minutes later your node appears:

A bizarre thing is that you are the only node I see without « Software » and « Version » filled in in Sakia. However your node is well giving them: http://vps3.stafverhaegen.be:8999. Maybe @Inso has an idea?

Another bizarre thing is that the GUI says your node is not reachable.

So I am wondering if some extra security stuff is not interfering with the network in some way. :confused:

Duniter desktop is still up, block # currently shown in GUI is 71113.
What can be a problem is that vps3.stafverhaegen.be has an IPv6 address but vps3.stafverhaegen.be:8999 will only (currently) be reachable through IPv4.
Other odd thing in my configuration is that I registered through Sakia on test_net and used a key length which I think is not supported by Duniter so the Duniter node is seen as non-member.


Edit: I now configured the node without remote host name, only remote ipv4 address. Behaviour stays the same and node 178.238.229.211:8999 is still listed as down in sakia.