Simple Linux program that takes any HTTP/HTTPS request and returns a single page?
Posted
by ultrasawblade
on Server Fault
See other posts from Server Fault
or by ultrasawblade
Published on 2010-02-26T19:06:14Z
Indexed on
2010/03/14
21:45 UTC
Read the original article
Hit count: 338
I have a Linux box operating as router. There's a NIC that's connected to the internet (WAN), a NIC connected to an 8-port GbE switch (LAN), and a NIC connected to a Linksys wireless N-router (WLAN). Routing between everything is working perfectly.
I have security completely disabled on the wireless router, but the WLAN NIC is firewalled such that it will only accept DNS queries and PPTP VPN connections. Currently HTTP/HTTPS traffic and everything else is blocked.
I would like to run something that listens on port 80/443 of the WLAN NIC, and, for non VPN'ed connections, given any HTTP/HTTPS request it will return a single webpage saying "Unauthenticated" and explain how to sign into the VPN. A transparent proxy seems to be what I need, but my searches all seem to direct me to Squid, which is already running on my server and seems overkill for this simple task.
Is there a simpler, lightweight program out there that does just this or should I just suck it up and run two instances of Squid (or figure out how to configure it)?
Or, is this entire VPN thing I'm doing complete nonsense and I should just enable encryption on the wireless router?
© Server Fault or respective owner