Easy way to lock internet using inet.bat

Home Topic  Previous Topic  Next Topic  Print this Topic

This chapter describes easy way to setup internet locking in games mode (or when computer is free). More accurate setup is possible using embedded in program network filter (though, majority of cafes don't need it).

 

Program starts external program named inet.bat when switches between working modes (free, games, internet, time out). It is started both on client and admin program. It is hard to implement the program that can lock internet compatible with all cafes so program doesn't include it. You should create this program (inet.bat) yourself (or ask local engineer to do that for you).

 

Recommended configuration:create inet.bat in the client program installation folder of each client computer. Use the example below "for client computers". Don't need to create this file for admin computer.

 

For admin computer:

 

Even though it is usually done using client computers only (they lock their internet themselves), it is possible to setup internet locking on admin computer.

Admin program changes its working mode by starting inet.bat with two parameters:

 

First parameter - computer number, starting with 1
Second paramter - mode number (0 - disable internet, 1 - games, 2 - internet)

 

For example, when program needs to allow internet for computer 10 it calls external program:

 

inet.bat 10 2

 

Using the information above you can create inet.bat for your cafe that will enable/disable internet using your unique cafe configuration. You should create this file in the admin program installation folder (together with ComputerZal.exe file).

 

For client computers:

 

To simplify internet enable/disable implementation, client program calls external program inet.bat when switches between working modes. Client version of inet.bat accepts only one parameter 'operating mode':

 

0 - disable internet

1 - games mode

2 - internet mode

 

Sample implementation:

 

IF %1==0 GOTO OFF

IF %1==1 GOTO GAMES

IF %1==2 GOTO INET

GOTO QUIT

:OFF

route delete 0.0.0.0

GOTO QUIT

:GAMES

route delete 0.0.0.0

GOTO QUIT

:INET

route add 0.0.0.0 mask 0.0.0.0 192.168.0.1

GOTO QUIT

:QUIT

 

Replace 192.168.0.1 with your Default Gateway used by client computer to access internet. The idea to delete default gateway when it is needed to disable internet (including games mode) and restore it when computer was rented for internet.

 

You should create inet.bat in the client program installation folder (i.e. together with Client2.exe, SetupClient2.exe).

 

Some program users additionally restart DHCP client service:

 

:INET

route add 0.0.0.0 mask 0.0.0.0 192.168.0.1

net stop Dhcp

net stop Dnscache

net start Dhcp

net start Dnscache

GOTO QUIT

:QUIT

 


Rambler's Top100