How to disable the Internet access but keep the LAN?

From Control Panel, look for your local area connection > properties.


Check the option called “Use the following DNS server address”.

Preferred DNS server: write
Alternative DNS server: write

These are just two random ips. These ips should be the ips of the computer that provides you the Internet connection but since they are wrong, you will end up with the Internet connection blocked.

Leave the other options as they are.

Another option

Another option if you want just to block the websites from being displayed in your browser, you can set up a fake proxy.

For Firefox, go to options, advanced, click the network tab. From connection, click on settings.

Check “Manual proxy configuration”. At HTTP proxy, write something like: Port: 80.

The proxy ip is fake and you won’t be able to access any website from Firefox.

Internet Explorer and Chrome have some similar options from you can set up a fake proxy.