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
- Version your configurations in Git
- Automate backups daily
- Use commit-confirm for remote changes
- Document changes through comments
- Test on staging before production
Security
- Disable password authentication for SSH
- Use SSH keys only for access
- Configure a firewall on all interfaces
- Restrict API access by IP
- Update the system regularly
Monitoring
- Set up syslog to a remote server
- Monitor key metrics (CPU, RAM, bandwidth)
- Track VPN tunnels for availability
- Alerting on critical events
- Collect metrics for trend analysis
Performance
- Enable hardware offloading where available
- Set the correct MTU for tunnels
- Use bonding for link aggregation
- Optimize firewall rules (specific rules at the top)
- 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 tailAPI 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