Sample Header Ad - 728x90

How to redirect all web requests from hosts connected to hotspot to a local web server?

2 votes
1 answer
4454 views
I literally have the same question as found in this post: https://android.stackexchange.com/questions/56373/how-to-redirect-complete-outgoing-phones-traffic-to-a-proxy-server[.] I have an Android phone acting as a hotspot server (using KWS). I am able to connect another device and access my little webpage by typing 192.168.43.1:8080 into the URL search of my browser, so no problem there. However, I would like for all requests by connected devices to be redirected to my webpage. The answer in the linked question suggests running two DNS servers using the Server's Ultimate app. My only hesitation is that it is not free, and the 'free' version is a 7 day trial. I have tried another app called "Set DNS," which seems promising, but it will not recognize my hotspot as a network; it keeps waiting for me to connect to something. **QUESTIONS:** - Can I simply change the /system/etc/hosts file as mentioned in the linked post? - Would I add a line such as: 192.168.43.1:8080 *? - If not, must I purchase Server's Ultimate, or is there another alternative? **PS:** This is for an advertisement. The webpage is to be static and informative (no malicious activity).
Asked by 123wee (21 rep)
Nov 12, 2016, 11:06 PM
Last activity: Jun 7, 2023, 10:01 PM