turn FW on and off for laptop users

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
 
J

James

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
 
D

David Wang [Msft]

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.
//
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top