Can ping a local server IP but can't browse a site into the server - browser

I have a server connected to the network with the ip 192.168.xxx.xxx. I can ping the ip but when i try to access from the browser to the server's localhost, obviusly with the IP, i can't.
What is wrong??
UPDATE!!
There was a network error... not configuration!! Thanks for help! Problem solved!

Check if the port you are trying to connect is open. If it is not, you have to bring up the port first, Example: if you are trying to run an app from tomcat, start tomcat first,

There are multiple reasons why this would happen:
The server is not set up to receive incoming connections. Check your firewall settings
The server isn't publicly visible (Meaning the server will appear to a ping, but all the ports are closed
The server isn't able to make outbound connections, again, check the firewall.
To test ports, either port forward, or put the server in to a DMZ (All ports are open)
Manually attempt a file transfer or another service by using ftp <IP of server>:<port number eg 21) or an SSH tunnel. If the FTP passes, then the HTTP port of the server may be down (port 80/8080).
Verify the router interconnecting your PC and the server isn't restricting local peer crosstalk.

Related

Why doesn't my Node.js express Server work on other devices?

I have started my Node.js express server running on port 3000 and it works on my local computer the server is running on. Then I have forwarded the port 3000 to the IPv4 adress of my computer in my router but I still cannot connect to the server on other devices.
HAs it something to do with the protocol? Do you know why it doesn't work.
To connect to a server on your own local LAN, you need the following things:
The local IP address of the server. It would typically be something like 192.168.1.x, but in some cases it might be of the form 10.0.0.x.
You need to make sure the computer the server itself is on does not have any local firewall that is blocking incoming http connections. On Windows 10, there is a local firewall that by default blocks incoming http requests so you would have to enable incoming http requests on the desired port in that firewall configuration.
You can then connect to that server from somewhere else on your local network with a URL of the form http://192.168.1.x:3000/ where the 192.168.1.x is the actual local IP address of your server computer and the 3000 is the port the server is running on.
You need to make sure your other devices are actually ON your local network. For example, if it's a phone, you need to make sure it's actually connected to your local network via WiFi and not connected to the visitor's connection that can only reach the internet, not your local network.
You do not need to do any port forwarding in your router. That's something that would be done when connecting to your server from outside your network (like from the internet). I that case, you'd have to connect to your public IP address and have that safely port forwarded to your server. But, since you said you're trying to connect to the server from within your LAN, you don't need any port forwarding on your external firewall.

how to view my website from anywhere which is running in my laptop at home.?

Things I did so far.
my website is running on port 80.
had opened my port 80 with the help of VPN book. confirmed with canyouseeme.org.
Created an account in noip.com. Created a hostname.
using the AsusZenfone3 mobile phone and airtel 4g mobile data. getting internet to my laptop via Hotspot/Tethering using wifi from phone and laptop.
had downloaded DUC from noip and it is running fine.
had configured a device in noip.com for my host like below,
- hostname
router brand as Asus(I don't use any router/ I don't know what router is used)
-software/device as HTTP
Is there any computer running on your network? Yes
downloaded Duc
port 80 check success
my host has been successfully configured.
I also added rules to my firewall to enable TCP and UDP 80 port access.
But still, I am not able to access my website.
I tried calling my website from the proxy server, I get an empty result from the server.
Cannot say for certain, but it sounds like you opened port 80 on your router but likely did not forward that port to an address on your local LAN.
Somewhere in your router config you should be able to find a port forward option. So any traffic received on that port would need to be forwarded to the local IP of the computer running the webserver.
Problem
Your port is not forwarded through your gateway connection.
Solution
Fwd Port Forwarding app for Android phone

How do I setup my Node.js server so clients can connect?

My little node.js server works fine, but only the host machine is able to connect with it. When i try to connect with other clients (which are connected to the same router as the host), I don't get a response. The server is listening at port 3000 (also tried 80, no difference), I tried setting the host ip to the network ip of the host computer, 127.0.0.1 and left it empty, but nothing worked.
How do i configure my server so that clients other than the host may connect?
Set the listen IP to 0.0.0.0. This listens on every interface.
Turn off your firewall to check that it is not the issue. When you turn it back on, allow port 3000 TCP incoming and outgoing.
127.0.0.1 is your local IP
if you are using wamp or mamp share your server on ip.
Next go on google check for whatsmyip. Give your ip adress to who you want to share your file.
Or if you consider to upload on server
except node_modules you have to upload the necessary files and folders. In server try npm install.
Make sure you have package.json
If you are new to Nodejs. Try Heroku
https://scotch.io/tutorials/how-to-deploy-a-node-js-app-to-heroku

Node server fails to listen to public IP

I am trying to get my Node.js server to listen to a public IP so that I can access it on a different network than my home network.
I've purchased a domain and used a DNS host - right now I'm using No-IP and have downloaded their client to push my IP to their servers.
When I set the IP on No-IP configuration to my local IP I can use the domain name and hit my server on another computer on my network. But if I change this to my public IP and use the domain, the request hangs for about 10 seconds and then fails. I've set up port forwarding (I believe correctly) and opened inbound / outbound traffic on the port I'm listening to (not 80 right now). I even pulled my firewall completely.
I tried changing server.listen(4444) to server.listen(4444, '0.0.0.0') as I've seen all over the web. But this doesn't work.
Anyone have ideas out there? I feel like maybe my ISP is blocking it somehow? I'm fairly new to networking, so maybe I'm missing something critical?
Thanks!
server.listen(4444) should be fine. As long as you don't have multiple active network connections in your server, you don't need to specify an IP address. Port forwarding from your router (if configured correctly) will direct the request that came from to public IP address to the actual local IP address of your host.
Note that for port forwarding to work reliably, you will have to give your host a fixed private IP address (not a DHCP assigned address) so the IP address will not vary. Then, you configure port forwarding to that fixed IP address.
Then, you need to do some network debugging. From a computer outside your own network (e.g. something out on the internet), you should do a couple commands to your public DNS name:
ping yourserver.net
tracert yourserver.net
If your DNS entry is not working, ping should tell you immediately that it didn't find yourserver.net.
If the DNS entry is working, but the IP address can't be reached, then ping will tell you that the server is unreachable. At that point, you will know you have a networking issue with connecting to your public IP address from the internet.
If ping is initially finding your server, but packets aren't flowing properly, then either the ping results or the tracert results should give you an idea where to look next.
If ping and tracert are finding your public IP and packets are flowing to/from it, but you still can't connect to it with the browser, then you either don't have the IP address set correctly (so you're not connecting to the right server) or your node.js server isn't listening appropriately or you aren't using the right ip/port in the browser that represents the actual node.js process. If you suspect this to be the case, then back up and make sure you have everything working purely on your own private network where the browser tries to connect directly to the local IP address and port. When that is working, you will know the node.js server is working appropriately and you can move back to working on the public IP.
FYI, if you tell us what the public DNS name and public IP address is, we here can do a few steps of this debugging from our computers.
It may be that your router can only forward a port to a computer on your network, but not change the port when forwarding. If that's the case, then you have these options:
Put everything on port 4444. Have your server listen to 4444, specify 4444 in the port forwarding in the router and then put 4444 in the URL like http://thecastle.ninja:4444.
Set up the port forwarding for port 80, put your server on port 80. Change the port forwarding to port 80. Change your server to listen to port 80 (if your server is Unix, you will need elevated privileges to listen to port 80 directly). You should then be able to use a URL like http://thecastle.ninja.
Set up the port forwarding for port 80, put your server on port 4444 and use ip table settings to route 80 to 4444 on your server. This allows your server to run in the less privileged 4444 port, but lets the end-user use the default port 80. I have a node.js server on a Linux Raspberry Pi configured this way. You should then be able to use a URL like http://thecastle.ninja
Run a proxy on your server that will route port 80 to port 4444. This is probably more than you need, but nginx is a popular one and it can do port forwarding on the server.

Port Forwarding on website

I'm noob in this field, so please help me understand this:
I have my web application launched on port 8080. I thought that if i forward port 8080 and enter from web browser: myexternalipadress:8080/Index.html it should open my website. please tell me why i'm wrong
Ahh, hosting a website from your house is a fun thing indeed. In my experience, here is how I approach trouble shooting.
1.Making sure your server is configured properly.
Launch the server application
If your client and server are the same machine, make sure you can reach the server on localhost
Access the server from a different computer on your LAN, use your servers lan ip. 192.168.?.?:8080
If you can't get to it from another machine on your LAN, you may have firewall issues on the server
2.Making sure your network is configured properly
This is where port forwarding comes into play. Figure out the LAN ip of the server and log into the router.
Tell your router to forward the port (8080 in this case) to the server LAN ip address.
Test it by telling your friend to access your server on (WAN_IP:8080 in web browser)

Resources