electrum-server
electrum-server copied to clipboard
multiple interfaces / ipv6
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?
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 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.
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.
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.
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?
Confirm this problem. +1