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

Public IPv6 Address #961

Open
Drewster727 opened this issue Nov 9, 2016 · 6 comments
Open

Public IPv6 Address #961

Drewster727 opened this issue Nov 9, 2016 · 6 comments

Comments

@Drewster727
Copy link

I'm happy to see the public IP address making it's way into these releases (especially in the export for v2.8).
However, I have an external ipv6 AND ipv4 address. Can we show both of these or allow us to choose which one displayed and exported?

  • Glances (glances -V): 2.7
  • PSutil (glances -V): 5.0.0
  • Operating System (lsb_release -a): Ubuntu Server 14.04 / 16.04

Thanks!

@nicolargo
Copy link
Owner

Glances uses online services to grab the external IP address:

urls = [('http://ip.42.pl/raw', False, None),
        ('http://httpbin.org/ip', True, 'origin'),
        ('http://jsonip.com', True, 'ip'),
        ('https://api.ipify.org/?format=json', True, 'ip')]

Can you try this on your system and check if one of them return the IPv6 address ?

@Drewster727
Copy link
Author

Sure, here are the results:

Looks like jsonip is the only one returning IPv6.

@nicolargo
Copy link
Owner

Can you copy/paste the result of the http://jsonip.com/ site ?

@Drewster727
Copy link
Author

Drewster727 commented Nov 9, 2016

{ "ip": "2705:b601:403:1401:80z3:8cx6:de6a:x42x", "about": "/about", "Pro!": "http://getjsonip.com" }

Here ya go, masked the address a bit tho :)

@nicolargo
Copy link
Owner

Ok i will have a look but for the moment Glances use the first (fastest) public IP address returned by one of the online services. I can add a tag (and an option in the configuration file) to force the use of jsonip but if the service is not available, no public IP addresses will be displayed...

@Drewster727
Copy link
Author

Perhaps a config option to only display ipv4? You can regex check the reply of each, and if you don't get a match, you don't return a value.

I imagine this will become a more and more relevant issue as public ipv6 addresses become more common.

Thanks!

@nicolargo nicolargo modified the milestones: Glances 2.8.1, Glances 2.9 Feb 6, 2017
@nicolargo nicolargo modified the milestone: Glances 2.9 Mar 10, 2017
@nicolargo nicolargo changed the title Public IP Address Public IPv6 Address Mar 10, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants