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.
|
Nou pe simpatie: theo23 la Simpatie.ro
 | Femeie 24 ani Arges cauta Barbat 26 - 45 ani |
|
|
Mrrrr's Forum (VIEW ONLY)ReguliInregistrareLoginPozeNu sunteti logat. Lista Forumurilor Pe Tematici
|
| #1 |
|
|
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: https://superuser.com/questions/1099040 ... and-prompt
_______________________________________

|
|
| |
|