Firewall
R2R Security Group and Firewall Configuration Guide
Proper security group and firewall configuration is crucial for securing your R2R deployment while ensuring necessary services remain accessible. This guide covers configurations for both cloud environments and local deployments.
Cloud Environments (AWS, Azure, GCP)
AWS Security Groups
- Create a new security group for your R2R deployment:
- Configure inbound rules:
Azure Network Security Groups
- Create a new Network Security Group:
- Add inbound security rules:
Google Cloud Platform Firewall Rules
- Create firewall rules:
Local Deployments
For local deployments, you’ll need to configure your operating system’s firewall. Here are instructions for common operating systems:
Ubuntu/Debian (UFW)
CentOS/RHEL (firewalld)
Windows (Windows Firewall)
- Open Windows Defender Firewall with Advanced Security
- Click on “Inbound Rules” and then “New Rule”
- Choose “Port” and click “Next”
- Select “TCP” and enter the specific ports (22, 7272, 8001, 8002)
- Choose “Allow the connection” and click “Next”
- Apply the rule to all profiles (Domain, Private, Public)
- Give the rule a name (e.g., “R2R Ports”) and click “Finish”
Best Practices
- Least Privilege: Only open ports that are absolutely necessary.
- IP Restrictions: When possible, restrict access to known IP addresses or ranges.
- Use VPN: For added security, consider using a VPN for accessing administrative interfaces.
- Regular Audits: Periodically review and update your security group and firewall rules.
- Monitoring: Implement logging and monitoring for all allowed ports.
- HTTPS: Use HTTPS for all web interfaces and APIs when possible.
Verifying Configuration
After setting up your firewall rules, verify that the necessary ports are open:
This should show the status of each port (open or closed).
Remember to adjust these configurations based on your specific deployment needs and security requirements. Always follow your organization’s security policies and best practices.