Well, I can see doing this with iptables rules, but I don't know how that would work with the pi-hole stuff you talked about in the other thread.
The gateway server should be running a copy of Apache or nginx with the page you wish to display when someone goes to the web. Then you could use something like this:
Code:
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 80
sudo iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to-ports 443
Those rules intercept any outbound packets destined for remote port 80 and 443 and sends them to the localhost address on the same ports.
Bookmarks