This project has moved. For the latest updates, please go here.

Not sure if bug or not (blocking)

May 23 at 1:12 PM
Edited May 23 at 8:47 PM
Is the block button supposed to act the same way as allow button (e.g create a rule in firewall)?
Log gives me this:
2017.05.23 14:54:02 - Administrator [True] - [INIT] OS: Microsoft Windows NT 6.1.7601 Service Pack 1 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\Program Files\WFN\ / Version: 2.0.6349.19227 (32 bit)
2017.05.23 14:54:14 - Administrator [True] - [INIT] OS: Microsoft Windows NT 6.1.7601 Service Pack 1 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\Program Files\WFN\ / Version: 2.0.6349.19227 (32 bit)
2017.05.23 14:54:14 - Administrator [True] - [WARNING] Unknown protocol type: 0
2017.05.23 14:54:14 - Administrator [True] - [WARNING] Unknown protocol type: 0
2017.05.23 14:54:17 - Administrator [True] - [ERROR] Unable to initialize WFN
System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
   at System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
   at System.String.Format(String format, Object[] args)
   at Wokhan.WindowsFirewallNotifier.Common.Helpers.FirewallHelper.AddBlockRuleIndirect(String ruleName, String currentPath, String currentAppPkgId, String[] services, Int32 protocol, String target, String targetPort, String localport, Boolean useCurrentProfile)
   at Wokhan.WindowsFirewallNotifier.Notifier.UI.Windows.NotificationWindow.createBlockRule(CurrentConn activeConn, String[] services, Boolean isTemp)
   at Wokhan.WindowsFirewallNotifier.Notifier.UI.Windows.NotificationWindow.createRule(Boolean doAllow, Boolean isTemp)
   at Wokhan.WindowsFirewallNotifier.Notifier.UI.Windows.NotificationWindow.btnIgnore_Click(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at System.Windows.Controls.Primitives.ButtonBase.OnClick()
   at System.Windows.Controls.Button.OnClick()
   at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
   at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
   at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
   at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   at System.Windows.Input.InputManager.ProcessStagingArea()
   at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
   at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run(Window window)
   at Wokhan.WindowsFirewallNotifier.Notifier.Managers.SingletonManager.OnStartup(StartupEventArgs e)
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
   at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
   at Wokhan.WindowsFirewallNotifier.Notifier.Program.Main(String[] argv)
Same log entry applies to DEMO MODE and random program.

BTW there is at least one place in main program window with "transparent" background (dark red)

Image
May 23 at 4:17 PM
Edited May 23 at 9:16 PM
Ok, tried all versions down to 1.9.0 in Win7 machine. All except latest 2.0 Beta 1 were able to write firewall rule (both allowed and blocked). Options "create blocking rule", "run as admin", "services detection" switched on.
Also run 2.0 Beta 1 and 2.0 Alpha 12 on a Win10 machine, same story, 2.0 Beta 1 cannot write blocking rule. Similar log entry as described above. Both machines are fresh out of box, no other firewalls, AV-s, shells etc. installed.

There is also questionable behaviour of options "animated notification" - didn't notice any change at all
and option "create blocking rule" turned off - only DEMO MODE block gets written in exclusion.set others will be blocked without entry, similar to skip.

And with latest version, cannot ping :( IIRC all other, at least 1.9 versions in Win7 allowed to do it. Here's log (allow ping 8.8.8.8):
2017/05/24 00:03:59 - SYSTEM [True] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:03:59 - John [False] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:03:59 - John [False] - [DEBUG] Starting Notifier: "C:\WFN\WFNV20BETA1_NODB\Notifier.exe" -pid 4 -threadid 0 -ip 8.8.8.8 -port 0 -protocol 1 -localport 8 -path System -impersonated 1
2017.05.24 00:04:00 - John [False] - [DEBUG] Initializing exclusions...
2017.05.24 00:04:00 - John [False] - [DEBUG] Adding item...
2017.05.24 00:04:00 - John [False] - [WARNING] Unable to retrieve process package id: process cannot be found!
2017.05.24 00:04:00 - John [False] - [WARNING] Unable to retrieve process local user owner: process cannot be found!
2017.05.24 00:04:00 - John [False] - [WARNING] Unable to retrieve process package id: process cannot be found!
2017.05.24 00:04:00 - John [False] - [WARNING] Unable to retrieve process local user owner: process cannot be found!
2017.05.24 00:04:00 - John [False] - [DEBUG] Displaying notification window...
2017.05.24 00:04:00 - John [False] - [DEBUG] No notification window loaded; creating a new one...
2017/05/24 00:04:00 - SYSTEM [True] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:00 - John [False] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:00 - John [False] - [DEBUG] Starting Notifier: "C:\WFN\WFNV20BETA1_NODB\Notifier.exe" -pid 4 -threadid 0 -ip 8.8.8.8 -port 0 -protocol 1 -localport 8 -path System -impersonated 1
2017.05.24 00:04:00 - John [False] - [DEBUG] Initializing exclusions...
2017.05.24 00:04:00 - John [False] - [DEBUG] Adding item...
2017.05.24 00:04:00 - John [False] - [DEBUG] Matches an already existing connection request.
2017.05.24 00:04:00 - John [False] - [INFO] Connection is blocked.
2017/05/24 00:04:01 - SYSTEM [True] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:01 - John [False] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:01 - John [False] - [DEBUG] Starting Notifier: "C:\WFN\WFNV20BETA1_NODB\Notifier.exe" -pid 4 -threadid 0 -ip 8.8.8.8 -port 0 -protocol 1 -localport 8 -path System -impersonated 1
2017.05.24 00:04:02 - John [False] - [DEBUG] Initializing exclusions...
2017.05.24 00:04:02 - John [False] - [DEBUG] Adding item...
2017.05.24 00:04:02 - John [False] - [DEBUG] Matches an already existing connection request.
2017.05.24 00:04:02 - John [False] - [INFO] Connection is blocked.
2017/05/24 00:04:02 - SYSTEM [True] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:02 - John [True] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:02 - John [True] - [DEBUG] Starting RuleManager: "C:\WFN\WFNV20BETA1_NODB\RuleManager.exe" QwB1AHMAdABvAG0AIABSAHUAbABlACAALQAgAFMAeQBzAHQAZQBtACMAJAAjAFMAeQBzAHQAZQBtACMAJAAjACMAJAAjACMAJAAjACMAJAAjADEAIwAkACMAIwAkACMAIwAkACMAOAAjACQAIwBGAGEAbABzAGUAIwAkACMAQQA=
2017.05.24 00:04:02 - John [True] - [ERROR] Unable to create the rule
System.ArgumentException: Value does not fall within the expected range.
   at NetFwTypeLib.INetFwRule.set_LocalPorts(String portNumbers)
   at Wokhan.WindowsFirewallNotifier.Common.Helpers.FirewallHelper.AddRule(String ruleName, String currentPath, String currentAppPkgId, String localUserOwner, String service, Int32 protocol, String target, String targetPort, String localport, NET_FW_ACTION_ action, Boolean isTemp, Boolean currentProfile)
2017.05.24 00:04:02 - John [True] - [ERROR] WFNRuleManager failure
System.Exception: Unable to create the rule
   at Wokhan.WindowsFirewallNotifier.RuleManager.Program.Main(String[] args)
2017.05.24 00:04:02 - John [False] - [INIT] OS: Microsoft Windows NT 10.0.14393.0 (64 bit) / .Net CLR: 4.0.30319.42000 / Path: C:\WFN\WFNV20BETA1_NODB\ / Version: 2.0.6349.19227 (32 bit)
2017.05.24 00:04:02 - John [False] - [DEBUG] Starting Notifier: "C:\WFN\WFNV20BETA1_NODB\Notifier.exe" -pid 4 -threadid 0 -ip 8.8.8.8 -port 0 -protocol 1 -localport 8 -path System -impersonated 1
2017.05.24 00:04:02 - John [False] - [DEBUG] Initializing exclusions...
2017.05.24 00:04:02 - John [False] - [DEBUG] Adding item...
2017.05.24 00:04:02 - John [False] - [DEBUG] Matches an already existing connection request.
2017.05.24 00:04:02 - John [False] - [INFO] Connection is blocked.
Developer
May 24 at 3:28 PM
The failure to create a rule is most likely a bug I introduced when working on the App-rule handling; I'll get that fixed.
The transparent background: I'll look at that too.
The "animated notification" option is supposed to turn off the "slide into view" behavior. Not sure if that worked in previous versions, but I'll be sure to fix it.
Pinging works for me on Windows 10; I'll have to test on Windows 7. Are you sure there isn't a rule blocking it though, since your log says "Connection is blocked." ?