VyOS icon

VyOS

Interact with VyOS router via HTTP API

Overview

This node interacts with a VyOS router via its HTTP API, specifically focusing on generating cryptographic keys and certificates under the "Generate" resource. The "WireGuard Key Pair" operation allows users to create WireGuard VPN key pairs, which are essential for setting up secure VPN tunnels using the WireGuard protocol.

Common scenarios where this node is beneficial include automating the setup of VPN connections in network infrastructure, integrating key generation into CI/CD pipelines for network devices, or managing multiple VyOS routers programmatically.

For example, a network administrator can use this node to generate WireGuard key pairs automatically when provisioning new VPN clients or servers, ensuring consistent and secure key management without manual intervention.

Properties

Name Meaning
Additional Fields Optional extra parameters to customize key or certificate generation.
- Key Size (Not applicable for WireGuard Key Pair) Specifies the size of SSH keys in bits (1024, 2048, 4096).
- Key Type (Not applicable for WireGuard Key Pair) Type of SSH key to generate (RSA, DSA, ECDSA, Ed25519).
- Subject (Not applicable for WireGuard Key Pair) Certificate subject distinguished name string.
- Validity Days (Not applicable for WireGuard Key Pair) Number of days the certificate is valid.
- Format Output Whether to format the output for better readability (true/false).

Note: For the "WireGuard Key Pair" operation, only the "Format Output" field is relevant from the additional fields collection; other fields pertain to SSH keys or certificates.

Output

The node outputs JSON data containing the generated WireGuard key pair. This typically includes:

  • privateKey: The private key string used by the WireGuard client or server.
  • publicKey: The corresponding public key string that can be shared with peers.

If the "Format Output" option is enabled, the keys may be formatted for easier reading or integration.

No binary data output is expected for this operation.

Dependencies

  • Requires access to a VyOS router configured to accept HTTP API requests.
  • An API authentication token or API key credential must be configured in n8n to authenticate with the VyOS API.
  • Network connectivity between n8n and the VyOS device is necessary.

Troubleshooting

  • Authentication errors: Ensure the API credentials are correct and have sufficient permissions.
  • Connection issues: Verify network connectivity and that the VyOS API endpoint is reachable.
  • Invalid response or empty keys: Confirm that the VyOS router supports the requested operation and that the API version matches the node's expectations.
  • Formatting issues: If output formatting causes problems, try disabling the "Format Output" option.

Links and References

Discussion