I have set up a Personal hotspot using Hostapd. But this hotspot is not connected to the internet but I do have Apache installed on it. What I am trying to achieve is to redirect all the clients (that are connected to my hotspot) to my apache page when they visit another website. So basically redirect all traffic to my Apache page.
What I have tried is :
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 192.168.150.1:80
But with this iptable the clients only get redirected to my Apache webpage when I share an internet connection with my hotspot. But without the internet connection they do not get redirected.