Do I need two routers to build a captive portal [closed]

I have recently started working with Asp.NET. I have decided to build a captive portal for windows as my first Asp.NET project.

Currently I am confused with the hardware requirements for a captive portal.

I have a normal home router and a laptop. The router is connected to INTERNET and my laptop is connected to the router.

When a user wants to access internet he/she connects to the router and as soon as they browse they are redirected to an authentication page being hosted on my laptop.

Once the user is authenticated and allowed access he should be able to surf the net.

My question is how do i reroute user from my laptop (after authentication) back to the router(internet gateway) to surf the internet.

I hope my question is clear.

Below is a diagram that might give you a clear idea

enter image description here

Answer

A router that sends people to a captive portal often uses a firewall that looks for a flag, or can check a user’s MAC, or any number of other methods to see if they have been properly authenticated, to decide where they are routed.

The logic is simple (maybe not this simple though),

if user != authenticated -> captive portal; else -> internet;.

A route in a captive portal is not static, the firewall makes that logic check quite often, and will route the user’s connection based upon the current state of the user.

Some just intercept the DNS traffic, some intercept HTTP traffic, some route/redirect everything.

Attribution
Source : Link , Question Author : crazyghost , Answer Author : NickW

Leave a Comment