electrum-server icon indicating copy to clipboard operation
electrum-server copied to clipboard

multiple interfaces / ipv6

Open iSOcH opened this issue 9 years ago • 6 comments

i just installed electrum server and finished indexing

setup:

  • ipv4 and ipv6 (and tor, but haven't tried anything there yet)
  • fqdn resolving to both ipv4 and ipv6
  • trusted ssl cert (not self-signed) for my fqdn

if i set host=my.fqdn.com in electrum.conf, electrum will only bind to my ipv6 interface. setting host=0.0.0.0 to bind on all ipv4 IFs works, but then i cannot set a correct report_host anymore;

  • if i create a special fqdn (that only resolves to v4) the ssl-cert name is not correct anymore
  • if i report my correct fqdn clients with working ipv6 won't reach me

how can i make electrum server bind to both ipv4 and ipv6?

iSOcH avatar Mar 16 '15 08:03 iSOcH

I wish we could use multiple host and report_host lines. Something like the following would be very nice:

# hostname. set it to a FQDN in order to be reached from outside
host = localhost                        # Proxied by Tor Hidden Service
host = 192.168.1.66                     # Private IPv4 NAT from 198.51.100.240
host = 2001:db8::66                     # Global IPv6
#report_host = 198.51.100.240           # Global IPv4 NAT to 192.168.1.66 (if static)
report_host = 2001:db8::66              # Global IPv6
report_host = electrum.example.com      # Resolves to IPv4 and IPv6 (might be dynamic)
report_host = duskgytldkxiuqc6.onion    # Tor Hidden Service

Thats more or less what bitcoind and tor relays do.

alainwolf avatar Apr 27 '15 23:04 alainwolf

@alainwolf The problem is that all the hosts, pruning limit, supported protocol flags (and ports, if non-standard) have to fit within 50 characters because it's communicated via the Name field on IRC. The onion address consumes almost half of that itself.

DarthAndroid avatar Jun 19 '15 15:06 DarthAndroid

Why not move it from the name field to a response to a CTCP message/response?

Another issue is if the host is dualstack and resolves to both an IPv4 and IPv6 address, the peerlist can only contain one entry as it's keyed on the nickname of the IRC user, rather than keyed on a unique host.

OverlordQ avatar Jul 21 '15 21:07 OverlordQ

I agree, should be moved to a CTCP message instead of a limited real_name field, this allows expansion later on, if you want to provide things like encryption as you can have the server respond with it's public key for example.

luggs-co avatar Jul 25 '15 05:07 luggs-co

Was this ever resolved? I believe that a solution to the IRC discovery issue was merged but the server still won't bind to more than one interface.

host = 0.0.0.0                         # binds only to IPv4 address
host = electrum.domain.com             # binds only to IPv6 address

report_host = electrum.domain.com      # makes both options work correctly

Why can't listen on 0.0.0.0:50002 and :::50002?

robcortez avatar Jul 16 '16 14:07 robcortez

Confirm this problem. +1

micressor avatar Sep 23 '16 06:09 micressor