external-clients.rst.txt 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. ================
  2. External Clients
  3. ================
  4. Introduction
  5. ===============
  6. Netmaker allows for "external clients" to reach into a network and access services via an Ingress Gateway. So what is an "external client"? An external client is any machine which cannot or should not be meshed. This can include:
  7. - Phones
  8. - Laptops
  9. - Desktops
  10. An external client is not "managed," meaning it does not automatically pull the latest network configuration, or push changes to its configuration. Instead, it uses a generated WireGuard config file to access the designated **Ingress Gateway**, which **is** a managed server (running netclient). This server then forwards traffic to the appropriate endpoint, acting as a middle-man/relay.
  11. By using this method, you can hook any machine into a netmaker network that can run WireGuard.
  12. It is recommended to run the netclient where compatible, but for all other cases, a machine can be configured as an external client.
  13. Important to note, an external client is not **reachable** by the network, meaning the client can establish connections to other machines, but those machines cannot independently establish a connection back. The External Client method should only be used in use cases where one wishes to access resource running on the virtual network, and **not** for use cases where one wishes to make a resource accessible on the network. For that, use netclient.
  14. Configuring an Ingress Gateway
  15. ==================================
  16. External Clients must attach to an Ingress Gateway. By default, your network will not have an ingress gateway. To configure an ingress gateway, you can use any node in your network, but it should have a public IP address (not behind a NAT). Your Netmaker server can be an ingress gateway and makes for a good default choice if you are unsure of which node to select.
  17. .. image:: images/exclient1.png
  18. :width: 80%
  19. :alt: Gateway
  20. :align: center
  21. Adding Clients to a Gateway
  22. =============================
  23. Once you have configured a node as a gateway, you can then add clients to that gateway. Clients will be able to access other nodes in the network just as the gateway node does.
  24. .. image:: images/exclient2.png
  25. :width: 80%
  26. :alt: Gateway
  27. :align: center
  28. After creating a client, you can edit the name to something more logical.
  29. .. image:: images/exclient3.png
  30. :width: 80%
  31. :alt: Gateway
  32. :align: center
  33. Then, you can either download the configuration file directly, or scan the QR code from your phone (assuming you have the WireGuard app installed). It will accept the configuration just as it would accept a typical WireGuard configuration file.
  34. .. image:: images/exclient4.png
  35. :width: 80%
  36. :alt: Gateway
  37. :align: center
  38. Example config file:
  39. .. literalinclude:: ./examplecode/myclient.conf
  40. Your client should now be able to access the network! A client can be invalidated at any time by simply deleting it from the UI.
  41. Configuring DNS for Ext Clients (OPTIONAL)
  42. ============================================
  43. If you wish to have a DNS field on your ext clients conf, simply edit the network field as shown below to 1.1.1.1 or 8.8.8.8 for example.
  44. If you do not want DNS on your ext client conf files, simply leave it blank.
  45. .. image:: images/extclient5.png
  46. :width: 80%
  47. :alt: Gateway
  48. :align: center
  49. Important to note, your client automatically adds egress gateway ranges (if any on the same network) to it's allowed IPs.