Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No IP address in enode addresses #2765

Closed
wawrzek opened this issue Jul 1, 2016 · 30 comments
Closed

No IP address in enode addresses #2765

wawrzek opened this issue Jul 1, 2016 · 30 comments
Assignees
Milestone

Comments

@wawrzek
Copy link

wawrzek commented Jul 1, 2016

System information

Geth version: instance: Geth/v1.4.8-stable/linux/go1.6.2 as well as many other version e.g 1.4.5/go1.5.1
OS & Version: Linux Ubuntu 16.04 (as well as 14.04)

Expected behaviour

IP address present in enode addresses.

Actual behaviour

no IP address for local and remote hosts

Steps to reproduce the behaviour

> admin.nodeInfo
{
  enode: "enode://7134088f7cd3a546e593af7a1cad4e6a6db4ef40bc6240e9f6decad72a1424d9d5d6296a1eca411eedd8113dc609ce05ec0bb3ad23f2ec791c093cfc02f9f398@[::]:30303",
  id: "7134088f7cd3a546e593af7a1cad4e6a6db4ef40bc6240e9f6decad72a1424d9d5d6296a1eca411eedd8113dc609ce05ec0bb3ad23f2ec791c093cfc02f9f398",
  ip: "::",
  listenAddr: "[::]:30303",
  name: "Geth/v1.4.8-stable/linux/go1.6.2",

Backtrace

[backtrace]
@wawrzek wawrzek changed the title Now IP address in enode addresses No IP address in enode addresses Jul 1, 2016
@karalabe
Copy link
Member

karalabe commented Jul 1, 2016

IP lookup requires UPnP to correctly function, and even then it's not always possible/correct if you're behind multiple layers of NAT.

I'm wondering if it would be worthwhile to differentiate between wanEnode and lanEnode. Will ponder about this a bit.

@wawrzek
Copy link
Author

wawrzek commented Jul 1, 2016

Nodes are in one subnet, so no firewall between them.
On 1 Jul 2016 18:17, "Péter Szilágyi" notifications@github.com wrote:

IP lookup requires UPnP to correctly function, and even then it's not
always possible/correct if you're behind multiple layers of NAT.

I'm wondering if it would be worthwhile to differentiate between wanEnode
and lanEnode. Will ponder about this a bit.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2765 (comment),
or mute the thread
https://github.com/notifications/unsubscribe/AA7ILKY8VhhU_LtdvLYRbny7FRFrSQd6ks5qRUu0gaJpZM4JDECk
.

@slr
Copy link

slr commented Aug 1, 2016

have same here, the node got no IP

Geth/v1.5.0-unstable-b8ba80bf/linux/go1.6.2
Ubuntu 16.04.1 LTS (GNU/Linux 4.4.0-31-generic i686)
eth0 and lo net interfaces only, static IP

@fjl
Copy link
Contributor

fjl commented Aug 1, 2016

If you have a static IP you can use --nat=extip:<your address> when starting geth. If you use this option the IP will show up.

@slr
Copy link

slr commented Aug 1, 2016

@fjl cool. but what about listenAddr?

listenAddr: "[::]:30303"

@fjl
Copy link
Contributor

fjl commented Aug 1, 2016

listenAddr tells you what the socket is listening on. This will always be [::] because we listen on all addresses.

@fjl
Copy link
Contributor

fjl commented Aug 1, 2016

We cannot resolve this issue until discovery takes feedback about the external IP into account.
The discovery protocol contains a neat feature that mirrors the external IP that other nodes see
back to the local node, but we don't use it yet. Doing so is planned for discovery v5.

@fjl fjl added this to the 1.6.0 milestone Aug 1, 2016
@slr
Copy link

slr commented Aug 1, 2016

@fjl ok, thanks.

@zelig zelig mentioned this issue Aug 29, 2016
17 tasks
@fjl fjl self-assigned this Jan 26, 2017
@fjl fjl added the network label Jan 26, 2017
@karalabe karalabe modified the milestones: 1.7.0, 1.6.0 Apr 13, 2017
@MysticRyuujin
Copy link
Contributor

MysticRyuujin commented Jul 22, 2017

I've attempted to use --nat extip:<my extip> on Ubuntu and it does the same thing where it shows @[::]:30303 in the enode address when I run admin.nodeInfo

Parity will show the correct public enode IP when I use the same command line option. Not sure if this is just an output/display issue or actually a problem? UPnP isn't an option for me.

Also, is it possible to have two public enodes? One for IPv4 and One for IPv6? My nodes are accessible via either...

@nicexe
Copy link

nicexe commented Sep 4, 2017

A quick and dirty way to get around this is to use --nat extip:`curl -s https://api.ipify.org`

It relies on a 3rd party service but it seems to be working well. The only think I couldn't test is reaching the service through an IPv6 gateway.

@leisegang
Copy link

leisegang commented Jan 28, 2018

Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 0 17654 - tcp 0 0 127.0.0.1:8545 0.0.0.0:* LISTEN 1001 20780 2082/geth tcp 0 0 127.0.0.1:6379 0.0.0.0:* LISTEN 0 15176 - tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 0 15163 - tcp6 0 0 :::22 :::* LISTEN 0 17662 - tcp6 0 0 :::30303 :::* LISTEN 1001 20778 2082/geth

its a fork of ETH, but its NOT listening on the IPv4 IP... ONLY on tcp6.

no matter what i do i cannot get it to listen on ipv4, i tried this: --nat extip:curl -s https://api.ipify.org

Screenshot: https://www.leisegang.no/src/Sqnuqlk6.png
@fjl could you look at this?

@nicexe
Copy link

nicexe commented Jan 29, 2018

@leisegang Can you post the output of curl -s https://api.ipify.org? If this isn't your IPv4 then using curl -s https://api.ipify.org won't really help you.

@leisegang
Copy link

its my ipv4 that is posted.
so no help in tat "fix"

@leisegang
Copy link

leisegang commented Feb 1, 2018

So what to do when it ONLY listens on the IPv6 and not the IPv4?
Just quit this eth pool?
https://www.leisegang.no/src/Lp6oD1Fd.png
@nicexe @fjl

@leisegang
Copy link

I need to get the port 30303 to work on the ipv4 interface as it ONLY listen on the ipv6 as far as i can see

@leisegang
Copy link

WHAT?

@bradamelton
Copy link

I'm not sure if this guy is real... He's been spamming this rep for several days now.

@leisegang
Copy link

@bradamelton got any solutions? I really dont want to give up eth...

@nicexe
Copy link

nicexe commented Feb 1, 2018

Use --nat=extip:1.2.3.4
Of course replace 1.2.3.4 with your real ip address

If it still doesn't work its probably a PEBKAC case

@leisegang
Copy link

the server responds at ip:80
but i have no :30303 on the ipv4 interface

@anlide
Copy link

anlide commented May 23, 2018

Trick with --nat=extip:1.2.3.4 not works:
NODE1 (with full-synced ETH)
At log file it shown like:
INFO [05-23|20:57:00] Mapped network port proto=tcp extport=30303 intport=30303 interface=ExtIP(1.2.3.4)

Going to netstats:
# netstat -lnptux | grep 30303 tcp6 0 0 :::30303 :::* LISTEN 25799/geth udp6 0 0 :::30303 :::* 25799/geth
It mean that geth not start listen to ipv4 address.

NODE2:
Unable to find any node for syncinc automatically over last 6 hours.

NODE2
# ping6 <NODE2 ipv6> connect: Network is unreachable

# ping <NODE2 ipv4>
works fine.

Result is: NODE2 geth service is down for a 6 hours.

How do you think: is it critical issue of ether network or not?
Answer: no. think BLOCK issue!

@EdwardAutumn
Copy link

You guys solved this problem yet?i still has this issue in 2018,man

@KiraToms
Copy link

KiraToms commented Jun 4, 2018

@anlide i have the same issue. Any fix ?

@anlide
Copy link

anlide commented Jun 4, 2018

@KiraToms no, just wait for ipv4 connection couple of hours.

@netcat-fan
Copy link

@leisegang i have the same problem to be fixed, my node only listen on tcp6 of port 30304, did you solved it?

@DieMyst
Copy link

DieMyst commented Aug 15, 2018

the same problem with swarm, the node only listen tcp6 of port 30399

@ja0k0010
Copy link

https://api.ipify.org

i run it, i take following enode for my private "enode://**9@100.104.55.:30303" but this ip add is not my device ip! so what is it?

@fjl
Copy link
Contributor

fjl commented Nov 28, 2018

This issue has finally been resolved in #17753. If discovery is enabled, the local IP is now determined from received UDP packets unless overridden by UPnP or --nat=extip:....

@ksemaev
Copy link

ksemaev commented May 21, 2020

--nat=extip works for me in 2020, TY for advice!

@NickCarducci
Copy link

isn't --nat=extip critically-necessary for a proper content-security allow-list (i.e. to allow _mint by RLP)? I think Authority by consensus can be useful for a forgot pass minter, but I don't think much else tbf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants