Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
|
Lista Forumurilor Pe Tematici
|
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login
POZE MRRRR'S FORUM (VIEW ONLY)
Nu sunteti logat.
|
Nou pe simpatie: Ema_Gheorghe
| Femeie 19 ani Bucuresti cauta Barbat 27 - 40 ani |
|
Mrrrr
AdMiN
Inregistrat: acum 18 ani
Postari: 2241
|
|
Key words: VBS, VBScript, Firewall, Disable, Enable, Windows, Script
1. Open the Windows Firewall and make one Custom Outbound rule to block all outgoing internet on all ports and all programs, name it 0_Disable_Internet_Out
2. In Windows Firewall also make one Custom Inbound rule to block all incoming internet on all ports and all programs, name it 0_Disable_Internet_In
3. Save each of the following two codes as individual vbs files, name them Disable_internet.vbs and Enable_internet.vbs or whatever.
One rule to disable all internet (enable In and Out rules = block all connections):
strTextOut="netsh advfirewall firewall set rule name=0_Disable_Internet_Out new enable=yes" strTextIn="netsh advfirewall firewall set rule name=0_Disable_Internet_In new enable=yes" Set shll = Wscript.CreateObject("Wscript.Shell") Return = shll.Run(strTextOut, 1, TRUE) Return = shll.Run(strTextIn, 1, TRUE) |
One rule to enable all internet (disable In and Out rules = allow all other rules):
strTextOut="netsh advfirewall firewall set rule name=0_Disable_Internet_Out new enable=no" strTextIn="netsh advfirewall firewall set rule name=0_Disable_Internet_In new enable=no" Set shll = Wscript.CreateObject("Wscript.Shell") Return = shll.Run(strTextOut, 1, TRUE) Return = shll.Run(strTextIn, 1, TRUE) |
Source:
_______________________________________
|
|
pus acum 1 an |
|