I can access the website locally but can't access it through the internet After openning the port - django

I want to make my phone a Linux web server, by using the userLand application which gives you the ability to use ubuntu distribution on Andriod.
I already installed Django and ran my server on port 8080 since port 80 is busy (seems logical that android is using it)
and everything is good, it works when I try to access the website from another device on the local network.
so I proceeded to the next step which is making the website accessible from all over the internet then I found that you need to make a port forwarding on the router to allow devices from outside the local network to access a device in the localnetwork .
I followed the following steps :
made the phone's IP static locally
added the configuration needed for the port forwarding (phone's ip, port 8080, etc... )
found the public IP for my phone and used it and with port 8080
it is still not working:
I can access the website locally but can't access it through the internet.
I tried another method by using an already working server from the "AWebServer" application on google play
but still the same problem.
I tried temporarily to disable the firewall on the router but still the same problem
and finally, I tried to open the port on my laptop with OS: Windows 10
instead of the phone OS: Android, and checked with port checker but the port is closed and still the same problem.
I have been trying to solve this for a whole day)), I would be very happy if someone helped me.
thanks
first image
second image

Your ISP might have put you under a NAT, in that case port forwarding might still not work.
Your best bet is to use some sort of SSH Tunnels.
You can try with ngrok.
This will give you a URL to access your application from public internet.
Only caveat here is that ngrok is not free. They have a subscription based model. In the free tier, you can use ngrok but the link url changes after few hours.
If you want to, you can also implement something like ngrok for yourself. Read about ssh tunneling more. This will help you.

Related

How do I link an already existing domain to a Windows Server 2019 VPS

I have a Django project running with Nginx and Waitress on my Windows VPS. I want to make it accessible to the public with a domain name. I am completely clueless on how to go about it, although I have pointed my domain's A record to the Public IP address of the VPS. To be specific, I am running a Windows Server 2019 on the Gcloud platform.
Check and make sure your VPS firewall settings are such that it allows request from public site at Port 80.
I just found a way to do it. I edited my Windows Server 2019 VPS firewall and added a port inbound rule, enabling request from remote clients on port 80 which is the port my nginx server serves from. #AnirudhBargi i guess i didn't understand your initial question. Enabling port 80 to accept request was the solution all along. Thank you very much.

I have a website running on local server ... need help making it public

Note: The ip addresses given are not the exact addresses. They are just for examples
I have a website built on flask running on a linux server that is using the internal ip address and a specific port... 192.168.10.10:1001. I know that the works on other computers on the same wifi.
How can I make the ip address public so that I can access the website without the wifi (outside network)? I know my the external ip address of the server... 100.250.250.25.
I have set up port forwarding so that I can 'access' my server from outside the network... 192.168.10.10:1000. I have accessed the server using the port forwarding but again it was on the same network. (Extra Question) Is that enough to access my server outside the network (or even using 100.250.250.25:1000)?
This applies to django as well because I have websites with django that I would like to use my server as well in the future. (Hopefully 192.168.10.10:1002).
You need to deploy your apps in live server like VPS. For the demonstration, you can try Heroku, pythonanywhere. You will find these tutorials available on other sites.

Host a website using Wamp server for global access not just local

How can I tweak my wamp server to host a website to the world?
I've been searching everywhere, but I can't seem to find the answer. All I find are post telling me to host locally to 127.0.0.1, but I cant find any post on how to broadcast the site globally.
I'm familiar with hosting a site on iis7.0, but now that I setup a wamp server I cant figure it out. I use dnsExit to point my domains to a dynamic ip address that stays auto-updated thanks to a dns exit ip updater program.
Can anyone please tell me step by step what do I have to do to broadcast a site to the world using a wamp server for windows 2008 server edition.
Make sure port 80 is open on your firewall and also port forwarded on your router to your PC. That should be it.
To test, browse to your external IP address. You should see your site.

Portforwarding : Virtualbox NAT connecting (Guest to Host)

I am using Macbook air and its OS is OS X 10.8.5, installed win7 with virtual box.
And developing web application at win7 virtual box, I want to port forward virtualbox
port to host port. So that I could test app on the host and also to the mobile phone
using same wifi.
First I didn't type host and guest ip and put the port value 8000.
I figured out guest ip and host ip by writing "ipconfig" and "ifconfig".
After running server of guest, I wrote the web address on host browser like below,
http://[guest ip]:8000/
But cannot load the web page of guest.
What is the problem?
And also if I want to load the web application of virtualbox to mobile phone
How could I do it?
Though it looks a bit silly, It would be glad to have an advice.
Thanks in advance :)
I would not recommend you to work that way, you can develop your web application right in your OSX, it would be much easier.
But if you have to do that way. Then first, because your network configuration is NAT, your VM will has an private IP like: 10.0.2.15, you need to forward to port to access, it likes:
From the above image, I forward port 2022 to 22, 2080 to 80 (web server)
So let's say your web is running at the same port 80, here is the URL for you to access to your web: 127.0.0.1:2080
BTW for me i don't like to work through the port forwarding, I prefer to configure my VM using "host only". By that way you can have an ip like 192.168.x.x and you can forget the port forwarding. You can read it more from here:
https://www.virtualbox.org/manual/ch06.html#network_hostonly
Hope it helps you.

Resolving DNS with winsock, with server behind router

I recently started to play around with sockets in windows and I ran into a bit of trouble..
I have an application that I want to find a host with DNS name resolution (through an internet connection).
The program manages to resolve the DNS name to an IP address, but the IP address it finds is the one of the router that sits in front of the computer that runs the server application(which is what I expect, since it is the default gateway)..
My question would be if there is a way to connect to the server application without having to modify the router's settings by hand every time the server application is installed on a system that has a router sitting in front of it.. Or is the only way to do this to somehow forwarding the port of the computer to the router ?
Any help is appreciated!
Thnx!
If the server is behind a router, then the router has to be configured for Port Forwarding. There is no getting around that. The router needs to know which machine on its network to forward incoming client requests to for any given port. However, depending on the type of router and its features, the server app might be able to configure the Port Forwarding programmably using uPNP or SNMP, if available and enabled. Otherwise, the router has to be configured by hand by the router admin.