Get LAN IP of connected user in my node.js app - node.js

How would I get the LAN IP of a user connected to my node.js app ?
I can get the WAN IP, but not sure how to get the LAN IP. I tried this
How can I get the local IP address in Node.js?
but all it does is give the LAN IP of the machine the node app is running on.

Related

How to connect to other devices localhost through same router?

I tried to connect to an IIS from WiFi but I couldn't although I succeeded connecting to it while that device was connecting to the router via LAN.
How should I change the router settings to connect to other devices localhost when all the devices are connected to the router via WiFi?
Router model: TP-link TD-W8901N
As far as I know, without using the DNS server, you couldn't access the web sites by using localhost url.
The only way you could access the site is using the ip address and the right port number.
You could firstly run ipconfig in the cmd tool on the IIS server.
Then you will record the IP address and the site's port number.
At last, you could use the IP address and the site prot number to access the sites.
Thr url like this: http://192.168.1.3:8098

How to access localhost:3000 on AWS through NodeJS server

I have a node js server set up on AWS using Linux instance(Ubuntu 14.04) I have started the server using the command npm start How do I access the localhost:3000. And when I do it locally I am able to access all the webpages by going to the browser. How can i access it when the server is on cloud?
The localhost host name is resolved to IP address 127.0.0.1 (or IPv6 equivalent) which is routed to the loopback interface so that you cannot reach any other host than your own with that. That's why it's called localhost in the first place.
To reach your host from the outside you need to know its external IP address or a domain name that resolves to its external address. You should be able to see your external IP in the dashboard. If you can't then see this answer.

How to connect to a webserver hosted on vmplayer guest os?

I am running a webserver (eg: tomcat7) in vmplayer guest, with NAT and I am able to view the webserver from guest using it's hostname:port but host browser is unable to connect to this webserver. Any idea? Is there any specific network configuration that needs to be done for host to connect to guest?
Note: I used ifconfig and got ip address from eth8, but ping request times out all the time.
VMWARE player network settings screenshot
Update
I also had to add entries in both machines hosts file for DNS
Change the network settings to use Bridged. That will connect to your router and get an IP off DHCP which your Host will be able to see. NAT is using your host address.

Connecting to a vpn connected computer thorugh global ip

I am trying to access a linux system which is connected to OpenVPN connection.
In my case the global Ip for VPN connection using tun1 interface is x.x.x.x. The global Ip when not connected to VPN and using only ethernet using eth0 interface is y.y.y.y.
I am routing all the traffic to the VPN NIC(tun1 in my case). I want to use the y.y.y.y IP to SSH in to my computer when it is connected to the VPN. I have port forwarded in my router to local IP and it is working correctly when not connected to the VPN.
I have tried adding the following in the routing table,
route add -host "dynamicdnssite.com" gw 192.168.0.1 dev eth0
dynamicdnssite.com- redirects to my global IP y.y.y.y
192.168.0.1 - Local Ip of my router
But it is not working as it routes only the outgoing connection and I want to route the incoming connection on certain port.
I found this myself. You have to be connected to the same VPN which you are accessing and connect with the ethernet's global IP(y.y.y.y in my case).

Getting the IP Address of client connected over Terminal Services Gateway

I'm trying to get the external IP Address of clients connected over Terminal Services through a Terminal Services Gateway.
I can get the IP Address using WTSQuerySessionInformation if I'm not connected through the gateway, but I get nothing but 0's when I run the same app through the gateway.

Resources