VyOS Administrator Guide

VyOS Administrator Guide

This section provides guides for administrators managing VyOS in production environments.

Section contents

VyOS Automation

Managing a fleet of VyOS devices through the REST API, Ansible, and Python.

Covers:

  • REST API for programmatic management
  • Python client for the VyOS API
  • Ansible playbooks and roles
  • Bulk device configuration
  • CI/CD integration
  • Automated backups
  • Monitoring and alerting

Practical scenarios:

  • Bulk interface configuration
  • Managing a fleet of routers with Ansible
  • Automating backups with rotation
  • CI/CD pipeline for testing
  • Monitoring through the API

Operational Mode

Commands for monitoring, diagnostics, and system management.

Covers:

  • Show commands for monitoring
  • Diagnostic commands
  • System operations
  • Viewing logs
  • Network diagnostics
  • Network debugging
  • Real-time monitoring

Troubleshooting

Resolving common problems and running diagnostics.

Covers:

  • Network connectivity problems
  • VPN tunnel problems
  • Routing problems
  • System performance
  • Diagnostic tools
  • Troubleshooting methodology

Configuration Blueprints

Ready-made solutions for various scenarios.

Covers:

  • NAT gateway for an office
  • Border router with BGP
  • VPN concentrator
  • Firewall with security zones
  • DHCP server with reservations

Best practices

Configuration management

  1. Version your configurations in Git
  2. Automate backups daily
  3. Use commit-confirm for remote changes
  4. Document changes through comments
  5. Test on staging before production

Security

  1. Disable password authentication for SSH
  2. Use SSH keys only for access
  3. Configure a firewall on all interfaces
  4. Restrict API access by IP
  5. Update the system regularly

Monitoring

  1. Set up syslog to a remote server
  2. Monitor key metrics (CPU, RAM, bandwidth)
  3. Track VPN tunnels for availability
  4. Alerting on critical events
  5. Collect metrics for trend analysis

Performance

  1. Enable hardware offloading where available
  2. Set the correct MTU for tunnels
  3. Use bonding for link aggregation
  4. Optimize firewall rules (specific rules at the top)
  5. Monitor CPU and network load

Automation for cloud environments

Yandex Cloud

  • Using cloud-init for initial configuration
  • Integration with the Yandex Cloud API
  • Automated deployment through Terraform
  • Managed VPN in Yandex Cloud

VK Cloud

  • Using cloud-init for initialization
  • Integration with the VK Cloud API
  • Templates for fast deployment
  • Scaling VPN infrastructure

Administrator tools

Command line

# Quick status check
show interfaces
show ip route
show system uptime

# Real-time monitoring
monitor interfaces ethernet eth0 traffic
monitor log

# Diagnostics
ping 8.8.8.8
traceroute 8.8.8.8
show log tail

API and scripts

  • REST API for automation
  • Python scripts for bulk operations
  • Ansible for orchestration
  • GraphQL for complex queries

Additional resources

Reviewed by OpenNix LLC · Last updated on