2

I've searched quite a bit not been able to find any examples using domain names or indeed any reason why it can't be used.

e.g. to start a node with bootnodes, the format is as below using ip addresses

geth --bootnodes enode://pubkey1@ip1:port1

I'm interested because for a private network I'm looking to build static IP addresses aren't really an option.

Is it possible to do:

geth --bootnodes enode://pubkey1@mydomain.com:port1

This would allow dynamic IPs for nodes.

Is this a security risk?

Many thanks

  • 2
    Might make yourself open to a denial of service attack if someone attacks DNS (either by making the DNS entry unavailable or changing the reported IP). – lungj Jan 25 '18 at 18:58
  • Not necessarily. The DNS name may be resolved by your trusted DNS servers on your internal network. I think this feature would really be helpful when deployed with modern orchestration frameworks (e.g. with Docker stack). – Jozef Mar 14 at 14:12
1

referring to the official doc, no it is not possible to use DNS domain names in enode URL:

The hostname can only be given as an IP address, DNS domain names are not allowed

https://github.com/ethereum/wiki/wiki/enode-url-format

I don't know why it's not supported though

  • 1
    Thanks - I have never seen that wiki despite searching! Would love to know why though... – user3190357 Jan 27 '18 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.