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

The obtained external IP is not a real public IP address. #17

Open
masx200 opened this issue Sep 3, 2020 · 1 comment
Open

The obtained external IP is not a real public IP address. #17

masx200 opened this issue Sep 3, 2020 · 1 comment

Comments

@masx200
Copy link

masx200 commented Sep 3, 2020

const NatAPI = require('nat-api')

const client = new NatAPI()


// Get external IP
client.externalIp(function(err, ip) {
  if (err) return console.log('Error', err)
  console.log('External IP:', ip)
})

External IP: 192.168.1.8

The obtained external IP is not a real public IP address.

You should request a website that can view the public IP address to get the real public external IP.

https://db-ip.com/

@masx200
Copy link
Author

masx200 commented Sep 3, 2020

If the device is behind the multi-layer nat device, how to map the port to the external public ip?

https://www.ip.cn/

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

1 participant