Giter Site home page Giter Site logo

rwsdns's Introduction

RWSDNS - RESTful Windows Server DNS

RWSDNS aims to provide a RESTful API for interacting with Windows Server DNS.

Installation on IIS

Installation has to be done on a DNS Server, you need the .NET Core SDK in order to publish the application.

(Thanks https://github.com/unosquare/passcore for the template!)
  1. Install IIS
  2. Download the source code and run the following command via an Command Prompt. Make sure you start the Command Prompt with the Administrator option and change directory to where the project files is saved.
    • dotnet publish --configuration Release --runtime win-x64 --output "<path>"
    • The <path> is the directory where you will be serving the website from.
  3. Install the .NET Core 3.0.0 Windows Server Hosting bundle.
  4. Go to your IIS Manager, Right-click on Application Pools and select Add Application Pool.
  5. A dialog appears. Under Name enter RWSDNS Application Pool, leave .NET CLR version and Managed Code as the default. Click OK.
  6. Now, right-click on the application pool you just created in the previous step and select Advanced Settings .... Change the Start Mode to AlwaysRunning, and the Idle Time-out (minutes) to 0. Click on OK. This will ensure the application stays responsive even after long periods of inactivity. Identity also has to be changed to an account with permissions to manage DNS.
  7. Back on your IIS Manager, right-click on Sites and select Add Website
  8. A dialog appears. Under Site name, enter RWSDNS. Under Application pool click on Select and ensure you select RWSDNS Application Pool. Under Physical path, click on the ellipsis (...), navigate to the folder where you extracted RWSDNS.
    • Important: Make sure the Physical path points to the parent folder which is the one containing the files, logs and wwwroot folders.
  9. Under the Binding section of the same dialog, configure the Type to be https, set IP Address to All Unassigned, the Port to 443 and the Hostname to something like dnsapi.yourdomain.com. Under SSL Certificate select a certificate that matches the Hostname you provided above. If you don't know how to install a certificate, please refer to SSL Certificate Install on IIS 8 or SSL Certificate Install on IIS 10 , in order to install a proper certificate.
    • Important: Do not serve this website without an SSL certificate because requests and responses will be transmitted in cleartext and an attacker could easily retrieve these messages and collect the API Key.
  10. Click OK and you should be set. You should change the default API Key which is 'Password' via the /api/v1.0/auth/ApiKey endpoint right away.

Example use - A Record for the DNS zone 'test.se'

http post for adding/updating, http delete for deleting all
note - Check the /tests/ folder for up-to-date URL:s in the powershell scripts

Alt text

Example use - CNAME Record for the DNS zone 'test.se'

(http post for adding/updating, http delete for deleting all) Alt text

rwsdns's People

Contributors

pierdet avatar marceljenner avatar

Watchers

 avatar

rwsdns's Issues

- Fix, doesn't work now.

// @Todo - Fix, doesn't work now.
var mgmtClass = new ManagementClass(mgmtScope, new ManagementPath("MicrosoftDNS_Zone"), null);
mgmtParams = mgmtClass.GetMethodParameters("CreateZone");
mgmtParams["DnsServerName"] = Environment.MachineName;
mgmtParams["ZoneName"] = zone;


This issue was generated by todo based on a Todo comment in 6c86512. It's been assigned to @pierdet because they committed the code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.