PNG IHDR ; IDATxܻn0K )(pA7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5 bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô!x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%tMז -lG6mrz2s%9s@-k9=)kB5\+͂ZsٲRn~GRCwIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL /F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ R IENDB` # internal-ip [](https://travis-ci.com/github/sindresorhus/internal-ip) > Get your internal IP address ## Install ``` $ npm install internal-ip ``` ## Usage ```js const internalIp = require('internal-ip'); (async () => { console.log(await internalIp.v6()); //=> 'fe80::1' console.log(await internalIp.v4()); //=> '10.0.0.79' })(); console.log(internalIp.v6.sync()) //=> 'fe80::1' console.log(internalIp.v4.sync()) //=> '10.0.0.79' ``` The module returns the address of the internet-facing interface, as determined from the default gateway. When the address cannot be determined for any reason, `undefined` will be returned. The module relies on operating systems tools. On Linux and Android, the `ip` command must be available, which depending on distribution might not be installed by default. It is usually provided by the `iproute2` package. `.v4.sync()` and `.v6.sync()` are not supported in browsers and just return `undefined`. ## Related - [internal-ip-cli](https://github.com/sindresorhus/internal-ip-cli) - CLI for this module - [public-ip](https://github.com/sindresorhus/public-ip) - Get your public IP address - [default-gateway](https://github.com/silverwind/default-gateway) - Get your default gateway address ---