Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

300
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!