Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

307
Vistas
How to find out Client's private ip in React or Node js?

Problem

Currently I need to compare the user's private ip with the ip of the certificate.

Is there a way to find out the user's private ip in react or node?

I tried

I got a public ip but not a private ip

/* in React.js */
    const getIP = async () => {
        const res = await axios.get('https://geolocation-db.com/json/');
        console.log("getIP : ",res.data);
        setCurrentIP(res.data.IPv4);
    }

    useEffect(()=>{
        getIP();
    },[]);
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Option 1 ->

Any IP address of your machine you can find by using the os module - and that's native to Node.js:

const os = require('os');

const networkInterfaces = os.networkInterfaces();
const ip = networkInterfaces['eth0'][0]['address']

console.log(networkInterfaces);

Option 2 ->

You might like to use npm package npm install internal-ip

import {internalIpV6, internalIpV4} from 'internal-ip';

console.log(await internalIpV6());
//=> 'fe80::1'

console.log(await internalIpV4());
//=> '10.0.0.79'

AND FOR REFERENCE FINS THE LINK BELOW. HOPE IT HELPS

Option 3 -> YouTube

Web App to check IP

GitHub Source Code

Some additional read you might like ->

For React.js -> Find Client's IP Address in React.js

For Node.js -> Client's IP Address in Node.js

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda