11 - 05 - 2024

CSharp Security-Editor - Enumerations

Bewertung:  / 2
Zurück zum Hauptartikel
Implementation von Enumerations für den CSharp - Security-Editor:
    
	[Flags]
    public enum SI_SECURITY_INFORMATION : uint
    {
        Owner = 0x00000001,
        Group = 0x00000002,
        Dacl = 0x00000004,
        Sacl = 0x00000008,
        Label = 0x00000010,
        ProtectedDacl = 0x80000000,
        ProtectedSacl = 0x40000000,
        UnprotectedDacl = 0x20000000,
        UnprotectedSacl = 0x10000000
    }
	
	/// <summary>
    /// A set of bit flags that determine the editing options available to the user. This member can be a combination of the following values. 
    /// </summary>
    [Flags]
    public enum SI_OBJECT_FLAGS : uint
    {
        /// <summary>
        /// If this flag is set, the Advanced button is displayed on the basic security property page.
        /// If the user clicks this button, the system displays an advanced security property sheet that enables advanced editing of the discretionary access control list (DACL) of the object.
        /// Combine this flag with the SI_EDIT_AUDITS, SI_EDIT_OWNER, and SI_EDIT_PROPERTIES flags to enable editing of the object's SACL, owner, and object-specific access control entries (ACEs).
        /// </summary>
        SI_ADVANCED = 0x00000010,
		
        /// <summary>
        /// If this flag is set, a shield is displayed on the Edit button of the advanced Auditing pages. For NTFS objects, this flag is requested when the user does not have READ_CONTROL or ACCESS_SYSTEM_SECURITY access.
        /// </summary>
        /// <remarks>Windows Server 2003 and Windows XP:  This flag is not supported.</remarks>
        SI_AUDITS_ELEVATION_REQUIRED = 0x02000000,
        
		/// <summary>
        /// Indicates that the object is a container. If this flag is set, the access control editor enables the controls relevant to the inheritance of permissions onto child objects.
        /// </summary>
        SI_CONTAINER = 0x00000004,
        
		/// <summary>
        /// If this flag is set, the system disables denying an ACE. Clients of the access control editor must implement the ISecurityInformation4 interface to set this flag.
        /// </summary>
        /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This flag is not supported.</remarks>
        SI_DISABLE_DENY_ACE = 0x80000000,
        
		/// <summary>
        /// Combines the SI_EDIT_PERMS, SI_EDIT_OWNER, and SI_EDIT_AUDITS flags. 
        /// </summary>
        SI_EDIT_ALL = SI_EDIT_PERMS | SI_EDIT_OWNER | SI_EDIT_AUDITS,
        
		/// <summary>
        /// If this flag is set and the user clicks the Advanced button, the system displays an advanced security property sheet that includes an Auditing property page for editing the object's SACL. To display the Advanced button, set the SI_ADVANCED flag.
        /// </summary>
        SI_EDIT_AUDITS = 0x00000002,
        
		/// <summary>
        /// If this flag is set, the Effective Permissions page is displayed. This flag is ignored if the ISecurityInformation object that initialized the access control editor does not implement the IEffectivePermission interface.
        /// </summary>
        SI_EDIT_EFFECTIVE = 0x00020000,
        
		/// <summary>
        /// If this flag is set and the user clicks the Advanced button, the system displays an advanced security property sheet that includes an Owner property page for changing the object's owner. To display the Advanced button, set the SI_ADVANCED flag.
        /// </summary>
        SI_EDIT_OWNER = 0x00000001,
        
		/// <summary>
        /// This is the default value. The basic security property page always displays the controls for basic editing of the object's DACL. To disable these controls, set the SI_READONLY flag.
        /// </summary>
        SI_EDIT_PERMS = 0x00000000, // always implied public const int SI_EDIT_OWNER = 0x00000001;
        
		/// <summary>
        /// If this flag is set, the system enables controls for editing ACEs that apply to the object's property sets and properties. These controls are available only on the property sheet displayed when the user clicks the Advanced button.
        /// </summary>
        SI_EDIT_PROPERTIES = 0x00000080,
        
		/// <summary>
        /// If this flag is set, the system enables editing attributes. Clients of the access control editor must implement the ISecurityInformation4 interface to set this flag.
        /// </summary>
        /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This flag is not supported.</remarks>
        SI_ENABLE_CENTRAL_POLICY = 0x40000000,
        
		/// <summary>
        /// If this flag is set, the system enables editing attributes. Clients of the access control editor must implement the ISecurityInformation4 interface to set this flag.
        /// </summary>
        /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This flag is not supported.
        SI_ENABLE_EDIT_ATTRIBUTE_CONDITION = 0x20000000,
        /// <summary>
        /// Indicates that the access control editor cannot read the DACL but might be able to write to the DACL. If a call to the ISecurityInformation::GetSecurity method returns AccessDenied, the user can try to add a new ACE, and a more appropriate warning is displayed.
        /// </summary>
        SI_MAY_WRITE = 0x10000000, //not sure if user can write permission 
        /// <summary>
        /// If this flag is set, the access control editor hides the check box that allows inheritable ACEs to propagate from the parent object to this object. If this flag is not set, the check box is visible.
        /// The check box is clear if the SE_DACL_PROTECTED flag is set in the object's security descriptor. In this case, the object's DACL is protected from being modified by inheritable ACEs.
        /// If the user clears the check box, any inherited ACEs in the security descriptor are deleted or converted to noninherited ACEs. Before proceeding with this conversion, the system displays a warning message box to confirm the change.
        /// </summary>
        SI_NO_ACL_PROTECT = 0x00000200,
        /// <summary>
        /// If this flag is set, the access control editor hides the Special Permissions tab on the Advanced Security Settings page.
        /// </summary>
        SI_NO_ADDITIONAL_PERMISSION = 0x00200000,
        /// <summary>
        /// If this flag is set, the access control editor hides the check box that controls the NO_PROPAGATE_INHERIT_ACE flag. This flag is relevant only when the SI_ADVANCED flag is also set.
        /// </summary>
        SI_NO_TREE_APPLY = 0x00000400,
        /// <summary>
        /// When set, indicates that the guidObjectType member of the SI_OBJECT_INFO structure is valid. This is set in comparisons with object-specific ACEs in determining whether the ACE applies to the current object.
        /// </summary>
        SI_OBJECT_GUID = 0x00010000,
        /// <summary>
        /// If this flag is set, a shield is displayed on the Edit button of the advanced Owner page. For NTFS objects, this flag is requested when the user does not have WRITE_OWNER access. This flag is valid only if the owner page is requested.
        /// </summary>
        /// <remarks>Windows Server 2003 and Windows XP:  This flag is not supported.</remarks>
        SI_OWNER_ELEVATION_REQUIRED = 0x04000000,
        /// <summary>
        /// If this flag is set, the user cannot change the owner of the object. Set this flag if SI_EDIT_OWNER is set but the user does not have permission to change the owner.
        /// </summary>
        SI_OWNER_READONLY = 0x00000040,
        /// <summary>
        /// Combine this flag with SI_CONTAINER to display a check box on the owner page that indicates whether the user intends the new owner to be applied to all child objects as well as the current object. The access control editor does not perform the recursion; the recursion should be performed by the application in ISecurityInformation::SetSecurity.
        /// </summary>
        SI_OWNER_RECURSE = 0x00000100,
        /// <summary>
        /// If this flag is set, the pszPageTitle member is used as the title of the basic security property page. Otherwise, a default title is used.
        /// </summary>
        SI_PAGE_TITLE = 0x00000800,
        /// <summary>
        /// If this flag is set, an image of a shield is displayed on the Edit button of the simple and advanced Permissions pages. For NTFS objects, this flag is requested when the user does not have READ_CONTROL or WRITE_DAC access.
        /// </summary>
        /// <remarks>Windows Server 2003 and Windows XP:  This flag is not supported.</remarks>
        SI_PERMS_ELEVATION_REQUIRED = 0x01000000,
        /// <summary>
        /// If this flag is set, the editor displays the object's security information, but the controls for editing the information are disabled. This flag cannot be combined with the SI_VIEW_ONLY flag.
        /// </summary>
        SI_READONLY = 0x00000008,
        /// <summary>
        /// If this flag is set, the Default button is displayed. If the user clicks this button, the access control editor calls the ISecurityInformation::GetSecurity method to retrieve an application-defined default security descriptor. The access control editor uses this security descriptor to reinitialize the property sheet, and the user is allowed to apply the change or cancel.
        /// </summary>
        SI_RESET = 0x00000020, //equals to SI_RESET_DACL|SI_RESET_SACL|SI_RESET_OWNER public const int SI_OWNER_READONLY = 0x00000040;
        /// <summary>
        /// When set, this flag displays the Reset Defaults button on the Permissions page.
        /// </summary>
        SI_RESET_DACL = 0x00040000,
        /// <summary>
        /// When set, this flag displays the Reset permissions on all child objects and enable propagation of inheritable permissions check box in the Permissions page of the Access Control Settings window. If this check box is selected when the user clicks the Apply button, a bitwise-OR operation is performed on the SecurityInformation parameter of ISecurityInformation::SetSecurity with SI_RESET_DACL_TREE. This function does not reset the permissions and enable propagation of inheritable permissions; the implementation of ISecurityInformation must do this.
        /// </summary>
        SI_RESET_DACL_TREE = 0x00004000,
        /// <summary>
        /// When set, this flag displays the Reset Defaults button on the Owner page.
        /// </summary>
        SI_RESET_OWNER = 0x00100000,
        /// <summary>
        /// When set, this flag displays the Reset Defaults button on the Auditing page.
        /// </summary>
        SI_RESET_SACL = 0x00080000,
        /// <summary>
        /// When set, this flag displays the Reset auditing entries on all child objects and enables propagation of the inheritable auditing entries check box in the Auditing page of the Access Control Settings window. If this check box is selected when the user clicks the Apply button, a bitwise-OR operation is performed on the SecurityInformation parameter of ISecurityInformation::SetSecurity with SI_RESET_SACL_TREE. This function does not reset the permissions and enable propagation of inheritable permissions; the implementation of ISecurityInformation must do this.
        /// </summary>
        SI_RESET_SACL_TREE = 0x00008000,
        /// <summary>
        /// If this flag is set, an image of a shield is displayed on the Change button of the Scope attribute. For NTFS objects, this flag is requested when the user does not have READ_CONTROL or WRITE_DAC access. Clients of the access control editor must implement the ISecurityInformation4 interface to set this flag.
        /// </summary>
        /// <remarks>Windows Server 2008 R2, Windows 7, Windows Server 2008, Windows Vista, Windows Server 2003, and Windows XP:  This flag is not supported.</remarks>
        SI_SCOPE_ELEVATION_REQUIRED = 0x08000000,
        /// <summary>
        /// Set this flag if the pszServerName computer is known to be a domain controller. If this flag is set, the domain name is included in the scope list of the Add Users and Groups dialog box. Otherwise, the pszServerName computer is used to determine the scope list of the dialog box.
        /// </summary>
        SI_SERVER_IS_DC = 0x00001000,
        /// <summary>
        /// This flag is set by the access control editor client to display read-only versions of the access control editor dialog boxes. These versions of the dialog boxes do not allow editing of the associated object's permissions. Clients of the access control editor must implement the ISecurityInformation3 interface to set this flag.
        /// This flag cannot be combined with the SI_READONLY flag. Windows Server 2003 and Windows XP:  This flag is not supported.
        /// </summary>
        SI_VIEW_ONLY = 0x00400000
    }
    
	/// <summary>
    /// A set of bit flags that indicate the property page being initialized. This value is zero if the basic security page is being initialized. Otherwise, it is a combination of the following values. 
    /// </summary>
    [Flags]
    public enum SI_ACCESS_RIGHT_FLAG
    {
        /// <summary>
        /// The Advanced Security property sheet is being initialized.
        /// </summary>
        SI_ADVANCED = 0x00000010,
        
		/// <summary>
        /// The Advanced Security property sheet includes the Audit property page.
        /// </summary>
        SI_EDIT_AUDITS = 0x00000002,
        
		/// <summary>
        /// The Advanced Security property sheet enables editing of ACEs that apply to the properties and property sets of the object.
        /// </summary>
        SI_EDIT_PROPERTIES = 0x00000080
    }
    
	/// <summary>
    /// The ACCESS_MASK data type is a DWORD value that defines standard, specific, and generic rights. These rights are used in access control entries (ACEs) and are the primary means of specifying the requested or granted access to an object.
    /// </summary>
    [Flags]
    public enum SI_ACCESS_MASK : uint
    {
        /// <summary>
        /// Delete access.
        /// Bit 16
        /// </summary>
        DELETE = 0x00010000,
        
		/// <summary>
        /// Read access to the owner, group, and discretionary access control list (DACL) of the security descriptor.
        /// Bit 17
        /// </summary>
        READ_CONTROL = 0x00020000,
        
		/// <summary>
        /// Write access to the DACL.
        /// Bit 18
        /// </summary>
        WRITE_DAC = 0x00040000,
        
        /// <summary>
        /// Write access to owner.
        /// Bit 19
        /// </summary>
        WRITE_OWNER = 0x00080000,
        
        /// <summary>
        /// Synchronize access.
        /// Bit 20
        /// </summary>
        SYNCHRONIZE = 0x00100000,
        
		STANDARD_RIGHTS_REQUIRED = 0x000F0000,
        STANDARD_RIGHTS_READ = READ_CONTROL,
        STANDARD_RIGHTS_WRITE = READ_CONTROL,
        STANDARD_RIGHTS_EXECUTE = READ_CONTROL,
        STANDARD_RIGHTS_ALL = 0x001F0000,
        SPECIFIC_RIGHTS_ALL = 0x0000FFFF,
        
		/// <summary>
        /// Access system security (ACCESS_SYSTEM_SECURITY). It is used to indicate access to a system access control list (SACL). This type of access requires the calling process to have the SE_SECURITY_NAME (Manage auditing and security log) privilege. If this flag is set in the access mask of an audit access ACE (successful or unsuccessful access), the SACL access will be audited.
        /// Bit 24
        /// </summary>
        ACCESS_SYSTEM_SECURITY = 0x01000000,
        
		MAXIMUM_ALLOWED = 0x02000000,
        GENERIC_READ = 0x80000000,
        GENERIC_WRITE = 0x40000000,
        GENERIC_EXECUTE = 0x20000000,
        GENERIC_ALL = 0x10000000,
        DESKTOP_READOBJECTS = 0x00000001,
        DESKTOP_CREATEWINDOW = 0x00000002,
        DESKTOP_CREATEMENU = 0x00000004,
        DESKTOP_HOOKCONTROL = 0x00000008,
        DESKTOP_JOURNALRECORD = 0x00000010,
        DESKTOP_JOURNALPLAYBACK = 0x00000020,
        DESKTOP_ENUMERATE = 0x00000040,
        DESKTOP_WRITEOBJECTS = 0x00000080,
        DESKTOP_SWITCHDESKTOP = 0x00000100,
        WINSTA_ENUMDESKTOPS = 0x00000001,
        WINSTA_READATTRIBUTES = 0x00000002,
        WINSTA_ACCESSCLIPBOARD = 0x00000004,
        WINSTA_CREATEDESKTOP = 0x00000008,
        WINSTA_WRITEATTRIBUTES = 0x00000010,
        WINSTA_ACCESSGLOBALATOMS = 0x00000020,
        WINSTA_EXITWINDOWS = 0x00000040,
        WINSTA_ENUMERATE = 0x00000100,
        WINSTA_READSCREEN = 0x00000200,
        WINSTA_ALL_ACCESS = 0x0000037F
    }
    
	/// <summary>
    /// A set of bit flags that indicate where the access right is displayed. This member can be a combination of the following. 
    /// </summary>
    [Flags]
    public enum SI_ACCESS_FLAG
    {
        /// <summary>
        /// The access right is displayed on the advanced security pages.
        /// </summary>
        SI_ACCESS_SPECIFIC = 0x00010000,
        
		/// <summary>
        /// The access right is displayed on the basic security page.
        /// </summary>
        SI_ACCESS_GENERAL = 0x00020000,
        
		/// <summary>
        /// Indicates an access right that applies only to containers. If this flag is set, the access right is displayed on the basic security page only if the ISecurityInformation::GetObjectInformation method specifies the SI_CONTAINER flag.
        /// </summary>
        SI_ACCESS_CONTAINER = 0x00040000,
        
        /// <summary>
        /// Indicates a property-specific access right. Used with SI_EDIT_PROPERTIES.
        /// </summary>
        SI_ACCESS_PROPERTY = 0x00080000
    }
	
	public enum SI_CALLBACK_MESSAGE
    {
        PSPCB_ADDREF = 0,
        PSPCB_RELEASE = 1,
        PSPCB_CREATE = 2,
        PSPCB_SI_INITDIALOG = 0x00401//WM_USER + 1
    }
    
    [Flags]
    public enum SI_INHERIT_FLAGS
    {
        CONTAINER_INHERIT_ACE,
        INHERIT_ONLY_ACE,
        OBJECT_INHERIT_ACE
    }
    
    /// <summary>
    /// The SI_PAGE_TYPE enumeration contains values that indicate the types of property pages in an access control editor property sheet.
    /// </summary>
    [Flags]
    public enum SI_PAGE_TYPE
    {
        /// <summary>
        /// The basic security property page for editing the object's DACL.
        /// </summary>
        SI_PAGE_PERM,
        
		/// <summary>
        /// The Permissions tab for advanced editing of the object's DACL, such as editing object-specific ACEs.
        /// </summary>
        SI_PAGE_ADVPERM,
        
		/// <summary>
        /// The Auditing tab for editing the object's SACL.
        /// </summary>
        SI_PAGE_AUDIT,
        
		/// <summary>
        /// The Owner tab for editing the object's owner.
        /// </summary>
        SI_PAGE_OWNER,
        
		/// <summary>
        /// The Effective Permission tab that displays the effective permissions granted to a specified user or group for access to the object.
        /// </summary>
        SI_PAGE_EFFECTIVE,
        
		/// <summary>
        /// A dialog box for changing the owner of the object.
        /// </summary>
        SI_PAGE_TAKEOWNERSHIP
    }
Zurück zum Hauptartikel

{jcomments off}

CSharp Security-Editor - Interface ISecurityInformation

Bewertung:  / 2
Zurück zum Hauptartikel
Implementation des Interface ISecurityInformation für den CSharp - Security-Editor:
	
	using System;
	using System.Runtime.InteropServices;
	using System.Windows;
	using System.Windows.Interop;
	
	/// <summary>
    /// The ISecurityInformation interface enables the access control editor to communicate with the caller of the CreateSecurityPage and EditSecurity functions. The editor calls the interface methods to retrieve information that is used to initialize its pages and to determine the editing options available to the user. The editor also calls the interface methods to pass the user's input back to the application.
    /// </summary>
    [ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("965FC360-16FF-11d0-91CB-00AA00BBB723")]
    internal interface ISecurityInformation
    {
        /// <summary>
        /// Requests information that is used to initialize the access control editor and to determine the editing options available to the user.
        /// </summary>
        ///<param name="pObjectInfo" />A pointer to an SI_OBJECT_INFO structure. Your implementation must fill this structure to pass information back to the access control editor.</param>
        void GetObjectInformation(ref SI_OBJECT_INFO pObjectInfo);
        
		/// <summary>
        /// Requests the security descriptor of the object being edited.
        /// </summary>
        /// <param name="RequestedInformation" />A set of SECURITY_INFORMATION bit flags that indicate the parts of the security descriptor being requested. This parameter can be a combination of the following values.</param>
        /// <param name="ppSecurityDescriptor" />A pointer to a variable that your implementation must set to a pointer to the object's security descriptor. The security descriptor must include the components requested by the RequestedInformation parameter. The system calls the LocalFree function to free the returned pointer.</param>
        /// <param name="fDefault" />If this parameter is TRUE, ppSecurityDescriptor should return an application-defined default security descriptor for the object. The access control editor uses this default security descriptor to reinitialize the property page. The access control editor sets this parameter to TRUE only if the user clicks the Default button. The Default button is displayed only if you set the SI_RESET flag in the ISecurityInformation::GetObjectInformation method. If no default security descriptor is available, do not set the SI_RESET flag. If this flag is FALSE, ppSecurityDescriptor should return the object's current security descriptor.</param>
        void GetSecurity(SI_SECURITY_INFORMATION RequestedInformation, IntPtr ppSecurityDescriptor, bool fDefault);
        
		/// <summary>
        /// Provides a security descriptor containing the security information specified by the user.
        /// </summary>
        /// <param name="SecurityInformation" />A set of SECURITY_INFORMATION bit flags that indicate the parts of the security descriptor to set. This parameter can be a combination of the following values.</param>
        /// <param name="pSecurityDescriptor" />A pointer to a security descriptor containing the new security information. Do not assume the security descriptor is in self-relative form; it can be either absolute or self-relative.</param>
        void SetSecurity(SI_SECURITY_INFORMATION SecurityInformation, IntPtr pSecurityDescriptor);
        
		/// <summary>
        /// Requests information about the access rights supported by the object being edited.
        /// </summary>
        /// <param name="pguidObjectType" />A pointer to a GUID structure that identifies the type of object for which access rights are being requested. If this parameter is NULL or a pointer to GUID_NULL, return the access rights for the object being edited. Otherwise, the GUID identifies a child object type returned by the ISecurityInformation::GetInheritTypes method. The GUID corresponds to the InheritedObjectType member of an object-specific ACE.</param>
        /// <param name="dwFlags" />A set of bit flags that indicate the property page being initialized. This value is zero if the basic security page is being initialized. Otherwise, it is a combination of the following values.</param>
        /// <param name="ppAccess" />A pointer to an array of SI_ACCESS structures. The array must include one entry for each access right. You can specify access rights that apply to the object itself, as well as object-specific access rights that apply only to a property set or property on the object.</param>
        /// <param name="pcAccesses" />A pointer to ULONG that indicates the number of entries in the ppAccess array.</param>
        /// <param name="piDefaultAccess" />A pointer to ULONG that indicates the zero-based index of the array entry that contains the default access rights. The access control editor uses this entry as the initial access rights in a new ACE.</param>
        void GetAccessRight(IntPtr pguidObjectType, SI_ACCESS_RIGHT_FLAG dwFlags, [MarshalAs(UnmanagedType.LPArray)]out SI_ACCESS[] ppAccess, ref uint pcAccesses, ref uint piDefaultAccess);
        
		/// <summary>
        /// Requests that the generic access rights in an access mask be mapped to their corresponding standard and specific access rights.
        /// </summary>
        /// <param name="pguidObjectType" />A pointer to a GUID structure that identifies the type of object to which the access mask applies. If this member is NULL or a pointer to GUID_NULL, the access mask applies to the object itself.</param>
        /// <param name="pAceFlags" />A pointer to the AceFlags member of the ACE_HEADER structure from the ACE whose access mask is being mapped.</param>
        /// <param name="pMask" />A pointer to an access mask that contains the generic access rights to map. Your implementation must map the generic access rights to the corresponding standard and specific access rights for the specified object type.</param>
        void MapGeneric(IntPtr pguidObjectType, IntPtr pAceFlags, IntPtr pMask);
        
		/// <summary>
        /// Requests information about how the object's ACEs can be inherited by child objects.
        /// </summary>
        /// <param name="ppInheritTypes" />A pointer to a variable you should set to a pointer to an array of SI_INHERIT_TYPE structures. The array should include one entry for each combination of inheritance flags and child object type that you support.</param>
        /// <param name="pcInheritTypes " />A pointer to a variable that you should set to indicate the number of entries in the ppInheritTypes array.</param>
        void GetInheritTypes(ref SI_INHERIT_TYPE ppInheritTypes, IntPtr pcInheritTypes);
        
		/// <summary>
        /// Notifies the application that an access control editor property page is being created or destroyed.
        /// </summary>
        /// <param name="hwnd" />If uMsg is PSPCB_SI_INITDIALOG, hwnd is a handle to the property page dialog box. Otherwise, hwnd is NULL.</param>
        /// <param name="uMsg" />Identifies the message being received. This parameter is one of the following values.</param>
        /// <param name="uPage" />A value from the SI_PAGE_TYPE enumeration type that indicates the type of access control editor property page being created or destroyed.</param>
        void PropertySheetPageCallback(IntPtr hwnd, int uMsg, SI_PAGE_TYPE uPage);
    }
	

Weitere Enumerationen und Struct-Elemente

Sowohl das Interface als auch die Klasse SecurityEditor verwenden weitere Enumerationen und Struct-Elemente, welche ebenfalls noch implementiert werden müssen:

 
 
Zurück zum Hauptartikel

{jcomments off}

DynDNS Service - Schritt-für-Schritt Anleitung

Bewertung:  / 4

Interesse an DynDNS Service, Version 2 ?   Bitte hier weiterlesen

In dieser Schritt-für-Schritt-Anleitung wird die allgemeine Vorgehensweise beschrieben wie DynDNS mit dem DynDNS Service in 3 Schritten konfiguriert werden kann. Voraussetzung ist ein vorhandenes DynDNS-Konto bei einem der vielen Anbieter für dynamisches DNS. Das kann der Anbieter ihres DSL-Anschlusses sein, der Hoster ihrer Internet-Domain oder einer der vielen unabhängigen Anbieter von denen der wohl bekannteste dyndns.org ist.

HINWEIS:
Für nicht näher erläuterte Konfigurationseinstellungen in den nachfolgenden Abschnitten sollten die jeweils angezeigten Standard-Einstellungen verwendet werden.
 
 

Schritt 1 - Öffentliche IP-Adresse erkennen

Zunächst wird der DynDNS Service im Tab "Erkennung" konfiguriert um die öffentliche IP-Adresse in ihrem System zu erkennen:
DetectionSettingsTab-de

  1. Wählen Sie aus der Dropdown-Liste im oberen Bereich die bereits vorkonfigurierte URI für ihren Anbieter aus oder geben Sie die URI aus den Konfigurationsbeschreibung ihres Anbieters ein. Im Fall von dyndns.org wäre das:
    CheckURIDropDown-de

  2. Der DynDNS Service benötigt Zugang zum Internet um die ausgewählte URI aufrufen zu können. Wenn in ihrem LAN Zugang zum Internet nur über einen Proxy-Server möglich ist, aktivieren Sie bitte in den "Proxy Einstellungen" die Benutzung des Proxy-Servers und geben Sie die URI für den Proxy-Server in ihrem LAN sowie ggf. dafür nötige Authentifizierungsdaten ein.

  3. Fertig! Das sind bereits alle nötigen Einstellungen für die Erkennung der öffentlichen IP-Adresse. Um zu Testen ob die Einstellungen funktionieren klicken Sie einmal auf den Button "Jetzt prüfen":
    PublicIPFound-de

    Es erscheint nach wenigen Sekunden ihre öffentliche IP-Adresse rechts neben dem Button. Wenn der DynDNS Service ihre öffentliche IP-Adresse gefunden hat können Sie mit Schritt 2 weitermachen.

 

Schritt 2 - Öffentliche IP-Adresse aktualisieren

Anschließend wird der DynDNS Service im Tab "Update" konfiguriert um die gefundene öffentliche IP-Adresse über das DynDNS-Feature an ihren Provider zu übermitteln:
UpdateSettingsTab-de

  1. Klicken Sie den Button "Neu" um den Provider-Editor für einen neuen Eintrag aufzurufen.

  2. Im Provider-Editor füllen Sie alle für das Update notwendigen Konfigurationsdaten ein welche Sie von ihrem Provider erhalten haben:

    1. Links oben als "Providername" geben Sie einen Namen ihrer Wahl ein.

    2. Links oben als "Domain Name" geben Sie den Internet-Domainname ein unter dem ihr Rechner künftig erreichbar sein soll.
      (z.B. "mydomain.com")

    3. In der Mitte als Update-URI wählen Sie aus der Dropdown-Liste die bereits vorkonfigurierte URI für ihren Provider oder geben die URI ein (Kopieren aus Zwischenablage) so wie sie sie von ihrem Provider erhalten haben. Im Fall von dyndns.org wäre das:
      ProviderUpdateDropDown-de

      ACHTUNG! Die Liste der voreingestellten Provider variiert in Abhängigkeit von der eingestellten Sprache!

    4. Links unten geben Sie die von ihrem Provider erhaltenen Authentifizierungsdaten ein.

    5. Rechts unten wählen Sie aus der Dropdown-Liste den Eintrag der das erfolgreiche Update markiert. Meistens antworten DynDNS-Provider mit den Begriffen "good" wenn das Update erfolgreich verlaufen ist oder "nochg" wenn die öffentliche IP-Adresse bereits aktuell ist.
      Wählen Sie bitte im Zweifelsfall den Eintrag "good,nochg" aus.

  3. Fertig! Das sind alle nötigen Einstellungen für das Update der öffentlichen IP-Adresse. Um zu Testen ob die Einstellungen funktionieren klicken Sie einmal auf den Button "Jetzt updaten":
    ProviderUpdateTest-de

    Es erscheint nach wenigen Sekunden die Meldung "Update erfolgreich" sowie die Antwort ihres Providers rechts neben dem Button. Wenn der DynDNS Service ihre öffentliche IP-Adresse aktualisiert hat können Sie den Provider-Editor mit Ok schließen.

 

HINWEIS:
Wenn Sie im DynDNS Service das DynDNS-Feature für mehrere Anbieter konfigurieren wollen, wiederholen Sie den Schritt 2 für jeden Anbieter separat.

 

Schritt 3 - Speichern der Einstellungen

Nun ist der DynDNS Service erfolgreich konfiguriert. Damit das Update künftig auch automatisiert abläuft müssen die Konfigurationseinstellungen noch gespeichert werden.

  1. Klicken Sie auf den Button "Speichern":
    Button Save-de

  2. Fertig! Bei jeder Änderung ihrer öffentlichen IP-Adresse wird diese nun bei ihren DynDNS-Anbietern aktualisiert.

 

Häufig verwendete URIs

Die nachfolgende Übersicht zeigt Erkennungs- und Update-URIs von Anbietern für welche der DynDNS Service häufig konfiguriert wird:

AnbieterTypURI
STRATO Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
https://dyndns.strato.com/nic/update?system=dyndns&hostname=[FQDN]&myip=[PUBLICIP]&wildcard=NOCHG&mx=NOCHG
TwoDNS Erkennung
http://checkip.twodns.de
Update
https://update.twodns.de/update?hostname=[FQDN]&ip=[PUBLICIP]
ALL-INKL Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
https://dyndns.kasserver.com/nic/update?hostname=[FQDN]&myip=[PUBLICIP]&system=dyndns&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG
Feste-IP Erkennung
http://checkip.feste-ip.net
Update
https://members.feste-ip.net/nic/update?system=dyndns&hostname=[FQDN]&myip=[PUBLICIP]
Domain Offensive Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
https://ddns.do.de/nic/update?hostname=[FQDN]&myip=[PUBLICIP]
SelfHost Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
https://carol.selfhost.de/update?username=[USERNAME]&password=[PASSWORD]&hostname=1
NameCheap.com Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
https://dynamicdns.park-your-domain.com/update?host=www&domain=example.com&password=[PASSWORD]&ip=[PUBLICIP]
Bitte beachten Sie folgende Hinweise: DynDNS Service Konfiguration für NameCheap.com
No-IP Erkennung
Unbekannt / Nicht angeboten. Benutzen Sie eine allgemeine URI, wie z.B.
http://www.wieistmeineip.de
Update
http://[USERNAME]:[PASSWORD]@dynupdate.no-ip.com/nic/update?hostname=[FQDN]&myip=[PUBLICIP]
 
HINWEIS:
Der DynDNS Service zeigt die Dropdown-Liste der verbreiteten DynDNS-Anbieter abhängig von der gewählten Sprache an. Je nach Reichweite eines DynDNS-Anbieters in einem Sprachgebiet kann dieser in der Dropdown-Liste an unterschiedlichen Positionen oder auch gar nicht erscheinen. Zum Beispiel wird ein Anbieter, der nur im deutschsprachigen Raum verbreitet ist, in der deutschsprachigen Dropdown-Liste angezeigt; in der englischsprachigen Dropdown-Liste dagegen nicht.


DynDNS Service - IPv6 Konfiguration

Bewertung:  / 1

Der DynDNS Service kann auch dazu verwendet werden um das DynDNS Update von Computern durchzuführen, welche unter IPv6-Adressen erreichbar sind. Sie benötigen jedoch dafür einen DynDNS-Provider, der auch das Update für IPv6-Adressen akzeptiert.

Folgende Zugriffs-Methoden können mit dem DynDNS Service konfiguriert werden:

 

Native IPv6 PublicIP

Bei der vom DynDNS Service erkannten PublicIP handelt es sich bereits um eine native IPv6 Adresse.

Die im DynDNS Service standardmäßig vorhandenen Update-URIs sind größtenteils auf IPv4-Updates konfiguriert. Bitte prüfen Sie ob ihr Provider für IPv6 möglicherweise eine andere Update-URI verwendet. Beispielweise setzen manche Provider gerne die Parameter ipv4 und ipv6 ein um zwischen ipv4- und ipv6-Adressen zu unterscheiden.

Beispiel für IPv4:

https://dyndns.regfish.de?fqdn=[FQDN]&ipv4=[PUBLICIP]&forcehost=1&authtype=secure&token=[USERNAME]

Beispiel für IPv6:

https://dyndns.regfish.de?fqdn=[FQDN]&ipv6=[PUBLICIP]&forcehost=1&authtype=secure&token=[USERNAME]

 

Konvertierung IPv4 nach IPv6

Bei der vom DynDNS Service erkannten PublicIP handelt es sich um eine IPv4 Adresse. Ihr Computer ist jedoch auch unter dem IPv6-Äquivalent in IPv6-Netzwerken erreichbar.

Der DynDNS Service unterstützt den Tunnelmechanismus 4-to-6 um eine IPv4-Adresse gleichzeitig auch als IPv6-Äquivalent bei ihrem DynDNS-Provider zu aktualisieren. Bitte prüfen Sie ob ihr Provider für IPv6 möglicherweise eine andere als im DynDNS Service voreingestellte Update-URI verwendet. Gehen Sie bitte vor wie unter Abschnitt "Native IPv6 PublicIP" beschrieben.

Wenn Sie die Update-URI ihres Providers für IPv6-Adressen kennen und der DynDNS Service für ihren Computer eine öffentliche IPv4-Adresse erkennt, verwenden Sie die Variable [IP4to6] anstelle von [PUBLICIP] um ihre IPv4-Adresse als IPv6-Äquivalent bei ihrem DynDNS-Provider zu aktualisieren.

Beispiel:

https://dyndns.regfish.de?fqdn=[FQDN]&ipv6=[IP4to6]&forcehost=1&authtype=secure&token=[USERNAME]



IPv4 Mapping

Bei der vom DynDNS Service erkannten PublicIP handelt es sich um eine IPv4 Adresse. Ihr Computer soll jedoch an einem IPv6-basierten DynDNS Dienst aktualisiert werden.

Der DynDNS Service unterstützt das Mapping-Verfahren IPv4 Mapping um eine IPv4-Adresse als IPv6-Adresse bei ihrem DynDNS-Provider zu aktualisieren. Bitte prüfen Sie ob ihr Provider für IPv6 möglicherweise eine andere als im DynDNS Service voreingestellte Update-URI verwendet. Gehen Sie bitte vor wie unter Abschnitt "Native IPv6 PublicIP" beschrieben.

Wenn Sie die Update-URI ihres Providers für IPv6-Adressen kennen und der DynDNS Service für ihren Computer eine öffentliche IPv4-Adresse erkennt, verwenden Sie die Variable [IP4mapped] anstelle von [PUBLICIP] um ihre IPv4-Adresse als gemappte IPv6-Adresse bei ihrem DynDNS-Provider zu aktualisieren.

Beispiel:

https://dyndns.regfish.de?fqdn=[FQDN]&ipv6=[IP4mapped]&forcehost=1&authtype=secure&token=[USERNAME]

Dabei wird die erkannte IPv4-Adresse nach links mit dem Präfix 0:0:0:0:0:FFFF::/96 vervollständigt.

 

IPv4 Translated

Bei der vom DynDNS Service erkannten PublicIP handelt es sich um eine IPv4 Adresse. Ihr Computer soll jedoch an einem IPv6-basierten DynDNS Dienst aktualisiert werden.

Der DynDNS Service unterstützt das Translating-Verfahren IPv4 Translated um eine IPv4-Adresse als IPv6-Adresse bei ihrem DynDNS-Provider zu aktualisieren. Bitte prüfen Sie ob ihr Provider für IPv6 möglicherweise eine andere als im DynDNS Service voreingestellte Update-URI verwendet. Gehen Sie bitte vor wie unter Abschnitt "Native IPv6 PublicIP" beschrieben.

Wenn Sie die Update-URI ihres Providers für IPv6-Adressen kennen und der DynDNS Service für ihren Computer eine öffentliche IPv4-Adresse erkennt, verwenden Sie die Variable [IP4translated] anstelle von [PUBLICIP] um ihre IPv4-Adresse als gemappte IPv6-Adresse bei ihrem DynDNS-Provider zu aktualisieren.

Beispiel:

https://dyndns.regfish.de?fqdn=[FQDN]&ipv6=[IP4translated]&forcehost=1&authtype=secure&token=[USERNAME]

Dabei wird die IPv4-Adresse nach links mit dem Präfix 0:0:0:0::FFFF:0::/96 vervollständigt.

DynDNS Returncodes

Bewertung:  / 5
Sofern der DynDNS-Anbieter Return Codes nach dem DynDNS v2 Standard verwendet, ist die Bedeutung der einzelnen Return Codes in der nachfolgenden Tabelle dokumentiert.

HINWEIS:
Bitte beachten Sie, dass darüber hinaus ein DynDNS-Anbieter auch individuelle Return Codes verwenden oder insgesamt eigene proprietäre Return Codes einsetzen kann. In diesem Fall wenden Sie sich bitte an ihren DynDNS-Anbieter für nähere Informationen.
 
Return CodeTypBeschreibung
Aktualisierung erfolgreich
good check
Das Update war erfolgreich und der Full Qualified Domain Name (kurz FQDN) wird nun aktualisiert.
nochg check
Das Update verändert keine Einstellungen und gilt als missbräuchlich. Zu häufige nochg Updates können zu einer Blockade des Updates des betroffenen FQDN führen.
Konto-bezogene Fehler
badauth error
Ungültige Kombination aus Benutzername und Passwort.
!donator error
Das angeforderte Update kann ohne manuellen Eingriff des Benutzers nicht ausgeführt werden. Bitte wenden Sie sich bezüglich näherer Informationen an ihren DynDNS-Anbieter.
FQDN-bezogene Fehler
notfqdn error
Der angegebene FQDN ist kein vollständig qualifizierter Domain-Name (nicht in der Form hostname.domain.tld oder domain.com).
nohost error
Der angegebene FQDN ist nicht dem verwendeten Benutzerkonto zugeordnet oder wird nicht vom DynDNS-Anbieter unterstützt.
numhost error
Zu viele FQDN (mehr als 20) wurden in der Update-URI angegeben. Der Fehler kann auch zurückgegeben werden wenn versucht wird mehrere FQDNs via Round-Robin (nicht erlaubt) zu aktualisieren.
abuse error
Der angegebene FQDN ist vorübergehend für Updates blockiert.
Agent-bezogene Fehler
badagent error
Der User-Agent "DynDNS Service V1.x" wurde vom DynDNS-Anbieter nicht akzeptiert.
good 127.0.0.1 error
Updates werden nur akzeptiert wenn auf die IP Adresse 127.0.0.1 aktualisiert wird. In allen anderen Fällen warnt der Returncode davor, dass das Update ignoriert wurde, weil der Agent "DynDNS Service V1.x" vom DynDNS-Anbieter nicht akzeptiert wurde.
DynDNS-Anbieter-bezogene Fehler
dnserr error
Es ist ein Fehler im DNS-System des DynDNS-Anbieters aufgetreten.
911 error
Es gibt ein Problem oder Wartungsarbeiten beim DynDNS-Anbieter.