Fri Mar 25, 2016 5:15 pm
Hi,
correct answer to this question is captive portal.
Captive portal is a system that intercept connection and display some advertising, and request identification to continue accessing internet.
But, today captive portal have a trouble, most web access is done using https. And intercepting https break security, and can be a criminal offense.
Captive portal can use some techniques, like packet interception and routing redirection, and dns wildcards.
Due security concern (to wifi users), I'm not comfortable to explain in detail how to do a basic access redirection.
Some firewall script/daemon have option to do this.
But, the idea is:
If redirect to same host that run a target page.
Use prerounting and redirect to local host.
If the page is on other server, use advanced routing table to route to server, and on server use prerouting do redirect to local host.
It is very similar to do a transparent proxy.
Sorry.