How to access remote machine nodeserver url from my system if both the systems are behind proxy - node.js

Suppose if my ip address is : 192.65.35.12. In this machine I'm running node server. I can access the webpages by using this url: http://localhost:3000/ in the same machine.
But, if I'm trying to access the node server from a remote machine having the ip 192.65.35.11. It does not work. I used the below url to access the url from the remote machine: http://192.65.35.12:3000/
I'm facing network connectivity issues.
Do, I need to change any settings in node.js for remote access.
Then, how can I access the node server from the remote machine.

if you can access localhost:3000, then type in 192.65.35.12:3000 on same machine. and if you are having problems connecting, then no outside computer going to connect. and you need to adjust your nodejs settings.
if you have server at home, and trying to connect from some place else not at home. you are more likely looking for something like "dynamic ip address" example: http://www.noip.com/ it helps getting past ISP (internet server providers) and your own routers, and publishing your ip address.
if you are dealing with 2 computers in your same house or business and passing through your own router, try changing the 192.65.35.12 to DMZ. basically by passing all router safety, if that happens, you are not opening correct ports on the router. or not setting other setting correctly.

Related

How to share web application on linux?

I host a web application on my laptop and I access it using 'localhost:9080/abc.com' and lets assume my IP is '192.168.10.20'
Now, I want my colleague to access this web application from his system 'web browser' by typing in '192.168.10.20:9080/abc.com'
As laptop is owned by 'company' I cannot install (or) use any third party softwares
How can I manage this on RHEL 6?
Assuming you're on the same network (LAN) then a client who connects to 192.168.10.20:9080 should have no problems (assuming the web aplication also listens to requests other than localhost).
If abc.com is just an "alias" you set up in your hosts file then no other person than yourself will be able to use abc.com to connect to 192.168.1.10.20, unless they have the same alias in their hosts file.
If you purchased a domain abc.com and set up it up to redirect to 192.168.10.20 it should work. But usually there are delays associated with updating a DNS so the time it takes for abc.com to be updated can take even a day.
Now if you have your colleagues on a different network (for example they want to connect from their homes when the laptop is connected to the internet at your place) it won't work with a bit of fiddling. Basically, when they try to connect the router gets a request from the client to connect to port 9080, but the router doesn't know what to do with it so nothing happens. You have to set up port forwarding in your routers settings so that all incoming traffic on port 9080 gets sent to 192.168.10.20.
And when they try to connect that way, they can not use the 192.168.10.20 ip adress, because it always refers to a adress on the local network. They have to use your external ip adress (google what is my ip adress).

WiFi server in NodeJS

What I want to do is write software in NodeJS to set up a WiFi server similar to those they use at cafeterias (with WPA2 security or something similar) and guests can connect with credentials or for free on my computer. (I am extra curious as to how I can redirect guests to an html page to enter credentials like they do on some places)
Is there a Node plugin(s) that help with something like this? If not, I am looking for advice like this:
Set up a server on port x and use npm package y and z
Check out this project
More info:
I am creating an intranet for academic purposes.
I have written a dns server in my computer in NodeJS that listens on 192.168.2.2:53 for UDP/TCP and successfully resolves domains in my private network.
My computer is a DHCP client of my Router device which provides access to the internet. Devices at home that use my private DNS server will resolve their dns requests to the internet, only if not found in my private dns.

Access My Windows 7 Server by External IP from Machine on Local Network

I have setup a number services on my home network (two security system DVR's and IIS on my Windows 7 machine).
All of these devices are behind two routers and have static IP's. I have configured port forwarding on both routers so that everything is accessible via my public IP address. When querying my public IP address outside from a machine outside of my local networ, everything is 100% accessible and working as expected. However, when querying my public IP from a machine or device on my local network, the requests just timeout with nothing served. The only way I can access these resources from a machine on my local network is by querying them by their local IP address.
To explain more clearly (using example IP's):
My Windows 7 machine (which has IIS setup, accessible over port 80) has a local IP of 192.168.1.100
My first security system DVR has a local IP of 192.168.1.101 and is accessible over port 5000
My second security system DVR has a local IP of 192.168.1.102 and is accessible over port 5001
My public (static) IP address is 222.222.222.222
When I am outside of my local network and I open http://222.222.222.222/ in my browser, my Windows 7 IIS website appears in my browser. When I am outside of my local network and I open http://222.222.222.222:5000/ in my browser, my first security system appears in my browser. Lastly, when I am outside of my local network and I open http://222.222.222.222:5001/ in my browser, my second security system appears in my browser.
However, when I am on my local network, I am unable to load any of these devices using my external IP address. The requests just timeout with nothing loaded. When I am on my local network the only way I can get these to load in my browser is by browsing directly to their local IP addresses in my browser.
I'm guessing that I somehow need to either A: get my request for my public IP when on my local network be first sent outside my local network and then sent back to it through my public IP or B: somehow detect if the public IP address is being queried from a local IP and if so, serve up those resources via their local IP...however I don't know if either of those are correct, and even if they are, I don't know how I'd go about doing it.
Can anybody point me in the right direction? All the machines on my local network I'd like to access these resources from are Windows 7 machines, if that makes a difference.
Ideally, you could utilize NAT loopback if your router(s) supports it. NAT Loopback Wiki
If your routers don't support NAT loopback, you may have to go with option B (better than A). Assuming you only need this functionality from one PC, you could mess with the routing tables. That would get really messy in Windows, but possible. AND you would have to track your dynamically changing external IP address somehow. I'll leave options A and B at "improbable" but I'd love for the community to prove me wrong =)

What address do I use to access my server from the internet?

I have an FTP server hosted on my computer and I want to make it publicly accessible.
I have forwarded the necessary ports for this specific computer on my router. If I type in my local ip, 192.168.x.x, i can access it. But this is only local. How do I access it publicly?
I tried going to my public ip but nothing comes up. I have searched Google for several hours now and have come up with nothing. What am I missing?
Test your server on https://incloak.com/ports/ or http://www.hackerwatch.org/probe/ sites and check that it detects your open FTP server. If not check you operating system firewall.

I can't access my Hyper-V Linux Web Server over the Internet

I'm trying to access a VM Linux Web Server from Internet but as response I get the server's internal IP.
Infra:
Physical PC: Windows 8 running on IP x.x.x.10 (internal) and y.y.y.y (external/internet)
Virtual Server: Debian 7.3 + Apache2, running on a Hyper-V machine, IP x.x.x.11
Router: D-Link DMG-6661 with 'Applications' and 'Virtual Server' set on both :80 and :7080, pointing to x.x.x.11
Inside my network everything works fine, I'm able to access my web page using both x.x.x.11:80 and x.x.x.11:7080.
Outside my network, lets say at work, if I try to access y.y.y.y:80 or :7080 I get ERR_NETWORK_ACCESS_DENIED and the address on my browser changes to x.x.x.11!
What am I missing here?
Thanks.
So difficult to answer you without precisions... Please check all network segments and software/hardware components ( linking your web browser at work to your Apache server). Lot's of thing may drop your connection. Think about these questions:
Does your router allow incoming connections from the Internet ? Is it configured to NAT/PAT incoming traffic to your Web server at x.x.x.11:80 ?
Does your Linux VM allow connections from other network than your LAN (netfilter/iptables configuration ?).
Does your Apache is configured to accept incoming traffic from any IP addresses ?
Regards

Resources