I have a local wireless network running. It is not connected to the internet and it has a webserver (lighttpd) running on 192.168.0.1
This webserver has a website running on it.
I want to know how can I redirect the user to "192.168.0.1" whenever he / she tries to access any other IP on this wireless network.
I have "dnsmasq" as my DNS Server.
To summarise:
"http://192.168.0.1" ==> Allowed to access
"http://193.168.0.1" ==> Makes no sense in this local wireless network, so want to redirect the user by default to "http://192.168.0.1"
Thanks, Mahendra.
You can try to add this row into you dnsmasq.conf:
From man page: ... with the additional facility that /#/ matches any domain. Thus --address=/#/1.2.3.4 will always return 1.2.3.4 for any query not answered from /etc/hosts or DHCP...
You can use iptables to redirect 80 port to yours ip
updated
Okay, I solved the problem. Posting the solution here back with hope that it helps somebody in the future...
I solved this by modifying the lighttpd.conf file. I added the following inside my lighttpd.conf file:
I even had to add the following to my dnsmasq.conf file: (thanks to the answer below)
address=/#/192.168.0.1
Thank you everybody for your time. Cheers!