Need help creating captive portal on Windows 10 hotspot - node.js

I have been trying to implement a sort of captive portal for users connected to my windows 10 hotspot, I am just trying to make it so when users connect to the hotspot they either get a pop up of the site I'm hosting locally or when they go to any domain in their browser it redirects them to the local site.
I have been trying to follow an already existing post on windows hot spot captive portals but I cannot get it working because I just don't know enough about how it works.
1. Start windows mobile hotspot.
2. Go to Network adapters => Select hotspot adapter => Change IPv4 settings => set 127.0.0.1 as DNS server.
3. Start dnschef with --fakeip = 192.168.137.1
4. Start an http server on 192.168.137.1 and give 302 redirect response to all requests.
I was following these instructions and I was able to get to step 3. At step 3 when the device tries to connect to a domain it has never connected to before it is properly redirected to my site but when I connect to a site like google.com it just doesn't load and wont redirect. It also wont give a captive portal popup when you first connect to the network.
I cannot get past step 3 because I do not understand how to Start an http server on 192.168.137.1 and give 302 redirect response to all requests. Some help on how I would be able to do this would be greatly appreciated, thank you.

Related

VPS: this site can't be reached

I purchased a VPS server, installed IIS, setup domain and published static index.html page. It worked if I go to mydomain.com but 1 or 1.5 hours later it stopped working and I can only see the message The site can't be reached.
The VPS is accessible via Remote desktop and if I locally run the IE I can access mydomain.com but It does not work from outside of the VPS.
If I reboot the VPS server then after a while the page can be accessed again but again it lasts for around 1-1.5hours.
What could be the reason of this?
If it is caused by idle timeout, then your index.html page will not be displayed, this error means that your browser cannot establish a connection with the website you try to reach, because your Internet connection has been interrupted or because your internet service provider has blocked the access to the website.
You can try the following methods to solve this error:
Restart your Internet Router.
Try to visit other websites, to make sure that your Internet connection is working.
If you own another computer/device in your place, then try to visit the website where your receive the "ERR_CONNECTION_CLOSED" error, in order to make sure that the site you 're trying to visit is not blocked from your ISP.
If you have setup a VPN connection, then disconnect from it.
Temporarily disable the Firewall application.

How did an IP send Get requests to my code?

I am new to web development. I am developing a flask web server on my linode linux web server on port 5000. I got this output from an unknown ip. I researched the ip and found out that this is a whitelisted IP address and is "harmless", but I dont know. It looks like it sent GET requests to my cover photo, the javascript, the css, an icon on the page, and an unknown request. What does sending a GET request to these items even entail? I dont have any button or anything that sends a get request to these items. Whenever I am developing the web server while on port 5000 I am usually the only IP on the output. Additionally, this web server communicates with a raspberry pi over mqtt over the non-encrypted port 1883.
Again, I am new to this world and am wondering if anyone can help me decipher what this means that would be very helpful. In the meantime should I will configure the servers firewall to only allow requests from my computers ip to my server? Anyone think this is a reasonable next step or have any additional advice?
I believe what's happening is that your website is sending a GET request to retrieve those assets (e.g. your images) which are stored under your localhost address and the paths that you see in the console output.

Configuring apache webserver to view default page over the web publicly by using ip address(dynamic)

I am new to configuring apache webserver(this is my first time) and over the last few days i have been trying to configure apache so as to view the default page over the internet.I have been successful partially in being able to view the default page over local host on the network. The problem really comes over when I try to view the page over the public ip of the server.Every time i try the page reports a time out and/or an error in connection, so I have increased the time out from 300 to 3000(the issue remains). I have searched extensively over the internet and based on the findings i have configured apache to grant all connections, i have also configured the firewall on my linux system to allow incoming & outgoing. Further I have configured my dad's huawei hotspot e55** series as mentioned in the link here https://portforward.com/huawei/ . I have also tried to configure my internet connection for port forward from external to the internal ip however what i observe is that after i do that my internet connection seems to get disabled and I would have to delete the connection and add another one.At this point it looks like that I might be missing out something here and I believe a little help from the apache experts might just help me achieve my goal to view the default apache web page over the web using the system (public)ip(using whatismyip on google search).
I think the public ip provided by your ISP cannot be used for hosting the website on the internet please contact your ISP to get a public IP that can host websites over the internet , or get a cloud hosting server.

cant connect to my iis7 hosted site on my mobile in the same network

I am using windows 7 Ultimate and iis7.5. I just created a site called steel.com and added it in to the host file like 127.0.0.1 steel.com.
It works fine on my local computer.
When I try to connect from another device (from my phone), nothing shows.
I connected those devices using hotspot from my laptop with baidu wifi hotspot.
I checked windows firewall.
I have added http rule and https rule
My site uses https protocol (steel.com).
Any idea what might be the issue?

Covert home pc to web server steps

I want to convert my home pc to a web server. Already IIS8 has been installed. The sample page has been published on default web site. In windows firewall the port 80 has been opened. I have access to this page through different computers that connect to the same ADSL router. However, when I try to connect to the page from another ISP, I get the error of 'web page not find'. Because I don't have static IP now, I find IP of the server from http://www.whatismyip.com/. I wonder if anybody help my to solve this issue.
One workaround it to use no-ip
http://www.noip.com/
this would give you static IP.
From this point is just normal domain setup.

Resources