[bisq-network/bisq] Change IP for local node connection to Loopback address (#4373)

dmos62 notifications at github.com
Tue Jul 28 10:25:30 UTC 2020


> On my linux system, getLocalHost() returns 127.0.1.1 - the hosts file alias for my hostname. The typical usecase for getLocalHost() is to get the LAN address of the host (e.g. 192.168.1.x) but even that it does unreliably as evidenced by it giving 127.0.1.1 on my system. All of these addresses will connect to local machine so long as the listener is bound to all incoming addresses (0.0.0.0) rather than a specific interface.

Hm, I'll lay out how I understand things, which conflict with some of the things you said:
- `0.0.0.0` doesn't, as far as ipv4 is concerned, signify "all interfaces". It signifies an invalid address and participants are free to interpret it as they like (the "all interfaces" interpretation is a common convention, but not the only one): 
    > In the Internet Protocol Version 4, the address 0.0.0.0 is a non-routable meta-address used to designate an invalid, unknown or non-applicable target. This address is assigned specific meanings in a number of contexts, such as on clients or on servers. [Wikipedia](https://en.wikipedia.org/wiki/0.0.0.0)
- `localhost`, as defined by ipv4, is meant to resolve to your default loopback interface, not the IP address of your physical interface; systems that can have multiple loopback interfaces (e.g. 127.0.0.1, 127.0.1.1, ...), like Linux, have ways to specify which is the default; sounds like on yours it's the hosts file.

In your situation, it seems like, the problem is that bitcoind is binding to a non-default loopback interface. Either reconfigure bitcoind, or change the default loopback interface by editing the hosts file.

I am against the suggestion to query for a loopback address directly in Bisq, because it's undefined what loopback address it should return. The purpose of localhost is to define which loopback address is the default, so it's idiomatic to use it.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/4373#issuecomment-664960730
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200728/15d3c9f7/attachment.html>


More information about the bisq-github mailing list