Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

thomas.g

Member
  • Joined

  • Last visited

  • Country

    Switzerland
  1. Hi. A method for adding port changes to the firewall: ICSSC_DEFAULT = 0; ICSTT_NAME = 0; ICSTT_IPADDRESS = 1; // from netcon.idl //NCM_SHAREDACCESSHOST_LAN = 8; //NCM_SHAREDACCESSHOST_RAS = 9; NAT_PROTOCOL_TCP = 6 NAT_PROTOCOL_UDP = 17 // from netcon.idl NCCF_SHARED = 0x0100; // Connection is shared NCCF_FIREWALLED = 0x0400; // Connection is firewalled // WScript.Echo ("Starting...."); Main(); // WScript.Echo ("Ending...."); function Main() { var objShare = new ActiveXObject("HNetCfg.HNetShare.1"); if (objShare == null) WScript.Echo ("failed to create HNetCfg.HNetShare object!"); else DoTheWork (objShare); return; } function DoTheWork (objShare) { var objEveryConnColl = objShare.EnumEveryConnection; if (objEveryConnColl == null) WScript.Echo ("failed to get EveryConnectionCollection!"); else { // enum INetConnections until props are correct var objEveryEnum = new Enumerator (objEveryConnColl); if (objEveryEnum == null) WScript.Echo ("failed to create Enumerator from EveryConnectionCollection"); else { for (objEveryEnum.moveFirst(); !objEveryEnum.atEnd(); objEveryEnum.moveNext()) { var objNetConn = objEveryEnum.item(); if (objNetConn == null) WScript.Echo ("can't get any net connections!"); else { var objNetConnProps = objShare.NetConnectionProps (objNetConn); if (objNetConnProps == null) WScript.Echo ("can't get net connection props!"); else { if ((objNetConnProps.Characteristics & NCCF_SHARED) || (objNetConnProps.Characteristics & NCCF_FIREWALLED)) { // found one! var objShareConf = objShare.INetSharingConfigurationForINetConnection (objNetConn); if (objShareConf == null) WScript.Echo ("can't make INetSharingConfiguration object!"); else { AddAsymmetricPortMapping (objShareConf); // WScript.Echo ("added a port mapping named 'Ben's Port Mapping'."); } } } } } } } // do other work here. // when you're done, // clean up port mapping // WScript.Echo ("cleaning up"); // if (objShareConf != null) // DeletePortMapping (objShareConf, NAT_PROTOCOL_TCP, 555, 444); } function AddAsymmetricPortMapping (objShareConf) { // in case it exists already.... // DeletePortMapping (objShareConf, NAT_PROTOCOL_TCP, 555, 444); var objPortMapping = objShareConf.AddPortMapping ( "Manager", NAT_PROTOCOL_TCP, 5912, 5912, 0, "127.0.0.1", ICSTT_NAME); // or "192.168.0.2", ICSTT_IPADDRESS); // if (objPortMapping != null) { // WScript.Echo ("just added NAT_PROTOCOL_UDP, 1761, 1761!"); objPortMapping.Enable(); // WScript.Echo ("just enabled port mapping!"); // } else // WScript.Echo ("failed to add asymmetric port mapping!"); } function DeletePortMapping (objShareConf, typeProtocol, iExternalPort, iInternalPort) { // enum, deleting match, if any var objPMColl = objShareConf.EnumPortMappings (ICSSC_DEFAULT); if (objPMColl == null) WScript.Echo ("can't get 'every' collection!"); else { var varEnumerator = new Enumerator (objPMColl); if (varEnumerator != null) { for (varEnumerator.moveFirst(); !varEnumerator.atEnd(); varEnumerator.moveNext()) { var objPortMapping = varEnumerator.item(); if (objPortMapping != null) { var objPMProps = objPortMapping.Properties; if (objPMProps != null) { if ((objPMProps.IPProtocol == typeProtocol ) && (objPMProps.ExternalPort == iExternalPort) && (objPMProps.InternalPort == iInternalPort)) { objPortMapping.Delete(); // or objShareConf.RemovePortMapping (objPortMapping); WScript.Echo ("just deleted " + typeProtocol + ", " + iExternalPort + ", " + iInternalPort + "!") } } } } } } } You have to change the var objPortMapping settings. In this example: - Manager (Name of the service) - NAT_PROTOCOL_TCP (Protocol: TCP or UDP) - 5912 (Portnumber) Save as .js
  2. Do you know, how to enable ICMP-Requests (VBS or JS)? Add Ports: http://msdn.microsoft.com/library/en-us/ic...gs_jscript_.asp
  3. Hi all, this is a wonderful script! Is it possible, to configure ports on this way?

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.