Patent ID: 8650495

Claim:
A method of providing a captive portal, the method comprising: receiving a first transmission control protocol (TCP) connection request from a client device, the first TCP connection request having a target address of a first web server; determining whether the client device is authorized to directly access the first web server; when the client device is authorized to directly access the first web server, passing the first TCP connection request to the first web server; and when the client device is not authorized to directly access the first web server: accepting the first TCP connection request and establishing a connection with the client device by pretending to be the first web server; receiving from the client device via the connection a hypertext transfer protocol (HTTP) request for a requested web page on the first web server; retrieving original content of a designated web page from a second web server; wherein the designated web page is different than the requested web page, the second web server is different than the first web server, and the second web server is a web server that the client device is authorized to directly access; modifying the original content of the designated web page as retrieved to form modified content having at least some of the original content of the designated web page preserved; wherein the modified content is formed such that a link in the original content that is a relative link without any specified base domain now has in the modified content a specified base domain pointing to the second web server; and replying to the client device via the connection with an HTTP response including the modified content; whereby a web browser on the client device displays the designated web page according to the modified content as if it were the requested web page provided by the first web server.