This guide covers how to set up and configure nebula on a Linux VPS. Whether you're running a production environment or a development setup, these instructions will help you get started quickly and securely.
Prerequisites
- Understanding of TCP/IP fundamentals
- A registered domain name (for public-facing services)
- A VPS running Ubuntu 22.04 or later (2GB+ RAM recommended)
- Root or sudo access to the server
Network Configuration
For production deployments, consider implementing high availability by running multiple instances behind a load balancer. This approach provides both redundancy and improved performance under heavy load.
# Network configuration and testing
ip addr show # View interfaces
ip route show # View routing table
ss -tlnp # View listening ports
# Firewall rules
sudo iptables -L -n -v # List current rules
sudo ufw status verbose # UFW status
These commands should be run as root or with sudo privileges. If you're using a non-root user, prefix each command with sudo.
Firewall Rules Setup
The mesh component plays a crucial role in the overall architecture. Understanding how it interacts with nebula will help you make better configuration decisions.
# Configure network interface
sudo nano /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.10/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
sudo netplan apply
Make sure to restart the service after applying these changes. Some settings require a full restart rather than a reload to take effect.
Testing Connectivity
After applying these changes, monitor the server's resource usage for at least 24 hours to ensure stability. Tools like htop, iostat, and vmstat can provide real-time insights into system performance.
# Network configuration and testing
ip addr show # View interfaces
ip route show # View routing table
ss -tlnp # View listening ports
# Firewall rules
sudo iptables -L -n -v # List current rules
sudo ufw status verbose # UFW status
This configuration provides a good balance between performance and resource usage. For high-traffic scenarios, you may need to increase the limits further.
Performance Tuning
Before making changes to the configuration, always create a backup of the existing files. This ensures you can quickly roll back if something goes wrong during the setup process.
# Configure network interface
sudo nano /etc/netplan/01-netcfg.yaml
network:
version: 2
ethernets:
eth0:
addresses:
- 192.168.1.10/24
routes:
- to: default
via: 192.168.1.1
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
sudo netplan apply
Each line in the configuration serves a specific purpose. The comments explain the reasoning behind each setting, making it easier to customize for your specific use case.
Conclusion
This guide covered the essential steps for working with nebula on a VPS environment. For more advanced configurations, refer to the official documentation. Don't hesitate to reach out to our support team if you need help with your specific setup.