Thread: Easiest way to cut off net access?

  1. #1
    Registered User
    Join Date
    Apr 2005

    Easiest way to cut off net access?

    Okay my parents asked me if it would be possible to write a program that can limit the time frame during which the internet can be accessed from my sisters computers. I haven't done any type of real network programming in C++ (some in Java) and figured this would be a good project to get a little bit ahead of my classes and to not forget everything I learned over the summer. The problem is, as far as actually blocking the internet I don't know where to begin at all. I can make the interface and set it up for my parents to access the settings and change what times they can use the net but I don't know how to actually cut it off. I'm sure there are many ways I was just looking for any easy suggestions.

  2. #2
    Amazingly beautiful user.
    Join Date
    Jul 2005
    If you knew I'd have to kill you
    Heres an easy way. Just run the command line programs below however you want (system("COMMAND") comes to mind).

    This won't stop anyone who knows much about Windows from using the internet, but should stop anyone somewhat computer illiterate.

    Simply run the command
    ipconfig /release_all
    to release all the network connections (disable the internet).

    ipconfig /renew_all
    to enable/reactivate all the network connections.

    Thats the easiest way I can think of off the top of my head.

    system("ipconfig /release_all");
    should disable it, etc.

  3. #3
    Registered User
    Join Date
    May 2005
    Also, there is another command for Windows XP to stop network connections, the code is as follows:
    You usualy have a pair of quotes surrounding Network connections, but of course, it wont work here.

    Which means that the command probaly wont work either, however, you could to it this way:

    system("start net.bat");
    And then save the following code as net.bat in the programs folder, via Notepad:
    @echo off
    net stop "network connections"
    And then to start it back up, create a another batch file using net start instead of net stop, or use variables.

    Of course, Crazy Norman's way is more efficient, and easier.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. accessing a database made in Access..
    By willc0de4food in forum Windows Programming
    Replies: 4
    Last Post: 10-10-2005, 07:40 PM
  2. FtpFileFind access violation with MS VC++ 6.0
    By earth_angel in forum C++ Programming
    Replies: 3
    Last Post: 09-22-2005, 07:02 PM
  3. Office access in C/C++ NOT VC++!! :)
    By skawky in forum C++ Programming
    Replies: 1
    Last Post: 05-26-2005, 01:43 PM
  4. 0xC0000005: Access Violation
    By Strider in forum Windows Programming
    Replies: 3
    Last Post: 11-07-2001, 02:46 PM
  5. How to access Network Card using C
    By vadiv in forum A Brief History of
    Replies: 0
    Last Post: 10-17-2001, 01:47 AM