Is there a script to stop LAN connection?

  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

Will anyone show me how to write a script to disable the LAN connection on my computer? I want to write a script to disable/enable the LAN connection on my server during certain times and days. Is it possible? Can anyone point me to directions or help on that?

Many thanks in advance!

ljCharlie
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • twiztit_momma
  • Proficient
  • Proficient
  • User avatar
  • Posts: 346
  • Loc: SanLeon Tx

Post 3+ Months Ago

i found a site,this explains in detail with pictures, http://www.proxyplus.nl/faq/articles/EN/art00300.htm
  • ModernDestroyer
  • Professor
  • Professor
  • User avatar
  • Posts: 794
  • Loc: California

Post 3+ Months Ago

Do you want to limit people accessing your server after or before business hours? If so then on win2k and later you can just go thru there profiles and say what time they can log on and what time they can no longer make network connections. Let me know if this is along the lines of what your after, Enjoy :D
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

this is simple enough in win nt, 2k, or xp... i can't remember what the command is for 9x...

Save a text file as discon.bat

@echo off
ipconfig /release

use AT (NT) or task schedule (2k, xp) to discon.bat to run at a specific interval.

use

ipconfig /renew to restore your connection.

note: this only works for IP and MD made a good point about user profiles.
  • ljCharlie
  • Proficient
  • Proficient
  • ljCharlie
  • Posts: 343

Post 3+ Months Ago

Many thanks for all your help. rjmthezonenet, what's the discon.bat look like? That's what I need to disconnect the connection.

The reason why I want to disconnect the network is so no can access the computer. Even if I enforce a profile for the login hours, this still isn't preventing hackers from coming ing.

One more thing, I found that disabling and enabling the DHCP Client service seems to do that trick, however, is there any problem or side effect if I use this method?

ljCharlie
  • rjmthezonenet
  • Expert
  • Expert
  • User avatar
  • Posts: 526
  • Loc: St. John's, Newfoundland, Canada

Post 3+ Months Ago

ljCharlie wrote:
...what's the discon.bat look like?

...I found that disabling and enabling the DHCP Client service seems to do that trick, however, is there any problem or side effect if I use this method?


discon.bat is just a text file with a bat extension. The contents of the file are two lines:

Code: [ Select ]
@echo off
ipconfig /release
  1. @echo off
  2. ipconfig /release


You could make a second bat file, recon.bat, and the contents would be:

Code: [ Select ]
@echo off
ipconfig /renew
  1. @echo off
  2. ipconfig /renew


Disabling the DHCP Client is unusual. Since it is used to obtain an IP address for your computer, I would guess it prevents you from connecting after start-up. Once a computer is connected, shouldn't have an effect. But, then again, maybe it does.

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 46 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.