Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Blocking a website on a router from a computer programatically

In short, I want to prevent all computers on a network from accessing netflix until a certain condition is met. The user is supposed to solve a few problems on a program before being able to watch netflix. The user shouldn't be able to watch netflix on any device until after solving the problems.

How can I get the program to enable or disable access to netflix across the entire LAN? Perhaps there's a way to remotely configure these settings on the router? I am able to change the router's firmware or even purchase a new router if needed.

All advice appreciated.

like image 957
aleph_null Avatar asked Dec 11 '22 00:12

aleph_null


1 Answers

What you're proposing is essentially the same system that many airports and coffee shops use to restrict access to the web on their networks, unless a user completes a task.

Functionally, there are a few commercial providers that do this:

  • Boingo
  • Aptilo
  • And others via this Forbes article

For what you want, it is a combination of hardware and software to achieve your goals. Your network layout will be similar to this network diagram, which shows:

  • Client computers
  • Server that provides DNS resolution and hosts a website
  • A switch
  • A modem / internet access point

The process will include your DNS server returning a fake IP address (such as 1.2.3.4) for the page the user requests, unless the user is authorized to pass. It is the same from a tech standpoint as DNS hijacking. Your webserver (which is at 1.2.3.4) will then return the page asking the user to complete the activity before being allowed to pass.

I'd suggest looking into this software for what you need:

  • Squid proxy
  • Open DD WRT
  • This Wikipedia list of router / firewall software
  • And an Ardiuno for the hardware portion since you can modify it a lot more than commercial routers
like image 132
Adam Link Avatar answered Jan 30 '23 11:01

Adam Link