turn FW on and off for laptop users

  • Thread starter Thread starter gjb
  • Start date Start date
G

gjb

I am trying to put together a script that will run periodically that could
determine if the laptop is on our internal network or remote and either turn
on or off the firewall. One suggestion I had heard was to have the PC look
for a file on a local server, and if the file exists or is reachable- turn
off the firewall. Otherwise turn it on. I think the hardest part for me is
turning on or off the firewall from a script. Does anyone have any ideas?
Thanks
gerald
 
to make changes xp firewall settings remotely :

1. put netsh command in batch files
2. run batch files using psexec

make sure u have admin permission over remote machines

Then u create some variables or files on file server, eg if exist some
files, execute the batch file using psexec
 
Turning the firewall on/off is the simple part.

NETSH firewall set opmode [ENABLE|DISABLE]

Personally, turning on/off the firewall depending on whether the laptop is
on internal or remote does not make a whole lot of sense.

You should leave the firewall on all the time and simply open different
ports/programs depending on whether the laptop is on your internal network
domain or remote. Windows Firewall supports this - just set different
configuration profiles and it'll detect on its own.

--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
 
Back
Top