Reset CheckPoint VPN Policy


Author: Dave
Date: 05.28.16 - 12:20am



If you use a Checkpoint VPN, it will apply a security policy to your machine when you connect that blocks any new server connections such as RDP or ftp from connecting to your machine.

Even after you disconnect the VPN this security policy remains in effect. In order to clear it, you need to either reboot, or as a friend pointed out reset the network interface with a disable/enable cycle. (thanks greg!)

You can boil this down to a quick vbs script.

strComputer = "." 
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") 
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapter")

tmp=""
For Each objItem in colItems 
    tmp = tmp & objItem.NetConnectionID & vbcrlf
    if objItem.NetConnectionID = "Local Area Connection" then 
	'Wscript.Echo "boom!"
        objItem.Disable
	WScript.Sleep 1000 
        objItem.Enable
	'Wscript.Echo "reset!"
	exit for
    end if 
Next

'Wscript.Echo tmp





Comments: (0)

 
Leave Comment:
Name:
Email: (not shown)
Message: (Required)
Math Question: 77 + 46 = ? followed by the letter: T 



About Me
More Blogs
Main Site
Posts: (All)
2020 ( 2 )
2019 ( 5 )
2018 ( 6 )
2017 ( 6 )
2016 (22)
     VB6 CDECL
     UDT Tricks pt2
     Remote Data Extraction
     Collection Extender
     VB6 FindResource
     CDO.Message
     DirList Single Click
     Reset CheckPoint VPN Policy
     VB6 BSTR Oddities Explained
     SafeArrays in C
     BSTR and Variant in C++
     Property let optional args
     Misc Libs
     Enum Named Pipes
     Vb6 Collection in C++
     VB6 Overloaded Methods
     EXPORT FUNCDNAME Warning
     VB6 Syncronous Socket
     Simple IPC
     VB6 Auto Resize Form Elements
     Mach3 Automation
     Exit For in While
2015 ( 16 )
2014 ( 25 )
2013 ( 4 )
2012 ( 10 )
2011 ( 7 )
2010 ( 11 )
2009 ( 3 )