Using dyndns host port forwarding in nginix is glitchy - web

Playing with a raspberry pi "presspi" image that's a WordPress turnkey. I can access it locally as well as over the local net. This appliance uses nginix. Port 80 is in use by another appliance running WordPress but on Apache so I set the nginix server to listen on port 82.
I have a dyndns account and created a webhop address forwarded to my public IP and to port 82.
In my router I have port 82 forwarded to the Pi appliances IP address.
If I go to a browser and pop in the dyndns address it launches THE OTHER site hosted on the other appliance with a totally different server and domain name and that site is listening on port 80.
I have done the following testing:
On the Pi itself if I hit localhost:82 it launches properly.
On the local network I hit the local ip of 192.168.0.4:82 in a browser it launches properly.
If I unplug the network cable going to the other PC that comes up unexpectedly and try the dyndns address in a browser it says site cannot be reached.
This leads me to believe that there is some further configuration needed in nginix to affirm the dyndns address but I'm not as familiar with it as Apache.

Related

how to connect to a server running on computer using computer's IP address?

I am working on IOT project in which I have to change some variables(fans speed, lights, etc). So just as a starter, I created a node.js server and tried to send requests to the server through a local network using local IP as
http://localhost:7000/users=mandar?lights=OFF
or
http://192.168.43.248:7000/users=mandar?lights=OFF
and it works fine.
Now I want to do the same over the internet. So I got Computer's IP address from https://www.google.co.in/search?q=myip and tried to send a request to the following URL:
http://(IP_address):7000/users=mandar?lights=OFF
This time it keeps on loading and finally shows this site can't be loaded.
So what is the right way to connect to the server through the internet?
Thank you.
You have to do port forwarding.
The IP address you get from the google search is the out-facing IP address of your router. However, your router knows your computer by your local IP address (i.e. 192.168.x.y).
You have to configure your router to send packets coming from internet destined to port 7000(or any other port) to your computer's port 7000.
Check your router's documentation on port forwarding. Likely there is a settings page on the web interface of your router that you can do the desired port forwarding. After configuring the router, there are several tools online to test if the port forwarding is actually working. I suggest you use one of those tools to verify the configuration before testing with your project.
You also might want to check if your router has a firewall. You can add an exception to the firewall such that a specific port number is reachable from the internet.

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 to visit a url in internal network?

My laptop is serving a web page at 127.0.0.3/abc, and I can visit it using this url on my laptop. Now my mobile phone and my laptop are using same wifi network. I can check the internal IP for my phone and my laptop. So my laptop's internal IP is 10.1.11.140, I'm wondering how I can visit the abc page with my phone. I tried 10.1.11.140/abc and 10.1.11.140/127.0.0.3/abc, neither works.
Thanks!
You need to verify
That your web server is bound to the external IP (10.1.111.140)
That your firewall permits access to port 80 (or whatever port you are serving your webpage)
You should assign your laptop a static ip address. Do this on your wireless router. Enable the firewall for this static ip and configure your webserver (website binding) by running inetmgr. And.. this address should not start with 127...

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.

IIS 7.5: Can browse website from LAN but not from outside

I have an MVC4 website set up in IIS 7.5. When I browse the website using my computer's IP address from a computer within my network, it works. But the website does not load when accessed from outside of the network.
I have a router and set up port forwarding on port 80 (also tried with others but I'll stick with this for the question), to forward to my PC's IP address. Also allowed incoming TCP requests on port 80 in my firewall.
In IIS 7.5 I am using the default website with the default bindings, which include a binding for port 80, all unassigned IP addresses and no hostname.
Locally I can browse my website using this address:
Local PC IP -xxx.xxx.x.xxx/LBSPrototype1
Shouldn't I be able to access my website from outside of the network using:
Router IP - xxx.xxx.x.x/LBSPrototype1
Since I forwarded port 80 to my local PC? Or alternatively if I use a different port:
Router IP - xxx.xxx.x.x:PORT/LBSPrototype1
I don't know what I am doing wrong, any ideas as to what I might have left out?
Tried disabling your firewall ? maybe some firewall rules are blocking you

Resources