getting-started.rst.txt 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. ===============
  2. Getting Started
  3. ===============
  4. Netmaker is a tool for creating and managing virtual overlay networks. If you have servers spread across multiple locations, data centers, or clouds, this platform can make life easier. Netmaker takes all those machines and puts them on a single, secure, flat network so that they can all talk to each other easily and securely. It's like a VPC but of arbitrary computers.
  5. Netmaker can be compared to and covers use cases similar to Tailscale, ZeroTier, or Nebula, but Netmaker does more than that, while being faster, more dynamic and more flexible.
  6. Netmaker uses kernel WireGuard to create encrypted tunnels between every node in your virtual network. Netmaker's `netclient` agent is self-updating and pulls any necessary changes (such as new peers) from the main server.
  7. Use Cases
  8. =========
  9. 1. Create a flat, secure network between multiple/hybrid cloud environments
  10. 2. Integrate central and edge services
  11. 3. Secure a home or office network while providing remote connectivity
  12. 4. Manage cryptocurrency proof-of-stake machines
  13. 6. Provide an additional layer of security on an existing network
  14. 7. Encrypt Kubernetes inter-node communications
  15. 8. Secure site-to-site connections
  16. Compatible Systems
  17. ==================
  18. To manage a server automatically, Netmaker requires **systemd-based linux.** Compatible systems include:
  19. - Fedora
  20. - Ubuntu
  21. - Debian
  22. - Mint
  23. - SUSE
  24. - RHEL
  25. - Raspian.
  26. - Arch
  27. - CentOS
  28. - CoreOS
  29. To manage DNS (optional), the server must have systemd-resolved. Systems that have this enabled include:
  30. - Arch
  31. - Debian
  32. - Ubuntu
  33. - SUSE
  34. In future releases, we will support other platforms such as Windows, MacOS, iOS, Android, and more.
  35. Video Tutorials and Articles:
  36. Quick Start
  37. ===========
  38. [Intro/Overview Video Tutorial](https://youtu.be/PWLPT320Ybo)
  39. [Site-to-Site Video Tutorial](https://youtu.be/krCKBJhwwDk)
  40. ### Note about permissions
  41. The default installation requires special privileges on the server side, because Netmaker will control the local kernel Wireguard. This can be turned off and run in non-privileged mode if necessary (but disables some features). For more details, see the **Usage** docs.
  42. ### Prereqs
  43. 1. A running linux server to host Netmaker, with an IP reachable by your computers (Debian-based preferred but not required).
  44. 2. Linux installed on the above server (Debian-based preferred but not required).
  45. 3. Install Docker and Docker Compose if running in Docker Mode (see below).
  46. 4. System dependencies installed:
  47. - Docker (if running in default Docker mode. DO NOT use snap install for docker.)
  48. - Docker Compose
  49. - Wireguard + Resolvectl (if running in default Client mode)
  50. #### CoreDNS Preparation
  51. v0.3 introduces CoreDNS as a private nameserver. To run CoreDNS on your server host, you must disable systemd-resolved to open port 53:
  52. 1. systemctl stop systemd-resolved
  53. 2. systemctl disable systemd-resolved
  54. 3. vim /etc/systemd/resolved.conf
  55. - uncomment **DNS=** and add 8.8.8.8 or whatever is your preference
  56. - uncomment **DNSStubListener=** and set to **"no"**
  57. 4. sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
  58. ### Launch Netmaker
  59. Note, this installs Netmaker with CoreDNS and a Netclient (privileged). If you want to run the server non-privileged or without CoreDNS, see the advanced usage docs.
  60. 1. Clone this repo or just copy contents of "docker-compose.yml" to your Netmaker server (from prereqs).
  61. 2. In docker-compose.yml, change BACKEND_URL to the public IP of your server.
  62. 3. Run `sudo docker-compose up -d`
  63. 4. Navigate to your server's IP in the browser and you should see the Netmaker UI asking to create a new admin user.
  64. 5. Create a new admin user
  65. 6. You are now ready to begin using Netmaker.
  66. ### Create a Network
  67. You can also just use the "default" network.
  68. 1. Click "CREATE NETWORK" in the upper left of your console
  69. 2. Enter a valid address range, e.g. 10.11.12.0/24
  70. 3. Enter a name such as "homenet"
  71. 4. Additional options:
  72. - **Dual Stack**: Machines will recieve a private IPv6 address in addition to their IPv4 address.
  73. - **Local:** Will use local address range for endpoints instead of public. Use Case: Home or Office network where most devices do not have public IP's. In this case you can create a gateway into the network after creating the Local Network.
  74. After Network creation, you can edit the network in the NETWORK DETAILS pane, modifying the address range and default options. You can also toggle on **Allow Node Signup Without Keys**, which makes the next step unnecessary, but allows anyone to create a node in your network, which will be cordoned in pending state.
  75. ### Create Keys
  76. 1. Click the "ACCESS KEYS" tab
  77. 2. Click "ADD NEW ACCESSS KEY"
  78. 3. Give your key a name and number of uses
  79. 4. Several values will be displayed. Save these somewhere, as they will only be displayed once:
  80. - **Access Key:** Use only in special edge cases where server connection string must be modified
  81. - **Access Token:** Use on machines that already have the netclient utility
  82. - **Install Command:** Use on machines that do not have the netclient utility
  83. ### Install Agent:
  84. For machines **without** netclient, run the install command (from above): `curl -sfL https://raw.githubusercontent.com/gravitl/netmaker/v0.3/netclient-install.sh | KEY=<your access key> sh -`
  85. For machines **with** netclient run the following (with access token from above): `sudo netclient -c install -t <access token>`
  86. For networks with **manual signup** enabled (see above), install using the network name: `sudo netclient -c install -n <network name>`
  87. ### Manage Nodes
  88. Your machines should now be visible in the control pane.
  89. **Modify nodes:** Click the pencil icon in the NODES pane to modify details like WireGuard port, address, and node name. You can also **DELETE** nodes here and they will lose network access.
  90. **Approve nodes:** If a node is in pending state (signed up without key), you can approve it. An icon will appear for pending nodes that need approval.
  91. **Gateway Mode:** Click the Gateway icon to enable gateway mode on a given node. A popup will allow you to choose an existing network, or enter a custom address range.
  92. *Example: You create a network in netmaker called Homenet. It has several machines on your home server. You create another network called Cloudnet. It has several machines in AWS. You have one server (server X) which is added to both networks. On Cloudnet, you make Server X a gateway to Homenet. Now, the cloudnet machines have access to your homenet machines. via Server X.*
  93. *On Homenet, you add Server Y, a machine in AWS, and make it a gateway to a custom address range 172.16.0.0/16. The machines on your home network now have access to any AWS machines in that address range via Server Y*
  94. ### Manage DNS
  95. On the DNS tab you can create custom DNS entries for a given network.
  96. 1. All dns entries will be *postfixed* with a private TLD of the network name, for example, ".mynet"
  97. 2. Default DNS is created for node name + TLD, for instance, node-c42wt.mynet. This is not editable.
  98. 3. Click ADD ENTRY to add custom DNS
  99. - You can click CHOOSE NODE to direct DNS to a specific node in the network
  100. - You can also specify any custom address you would like, which can be outside the network (for instance, the IP for google.com)
  101. - Add a dns entry name, which will be postfixed with the network TLD. E.g. if you enter "privateapi.com", it will become "privateapi.com.networkname"
  102. ### Uninstalling Client
  103. To uninstall the client from a network: `sudo netclient -c remove -n < networkname >`
  104. To uninstall entirely, run the above for each network, and then run `sudo rm -rf /etc/netclient`
  105. ### Uninstralling Netmaker
  106. To uninstall the netmaker server, simply run `docker-compose down`
  107. #### LICENSE
  108. Netmaker's source code and all artifacts in this repository are freely available. All versions are published under the Server Side Public License (SSPL), version 1, which can be found here: [LICENSE.txt](./LICENSE.txt).
  109. #### CONTACT
  110. Email: [email protected]
  111. Discord: https://discord.gg/zRb9Vfhk8A