> ## Documentation Index
> Fetch the complete documentation index at: https://docs.loupp.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Network

> Manage firewall rules, load balancing, and network configuration on your servers in Loupp

## Overview

Network management in Loupp provides control over firewall rules and load balancer setup for your servers.

## Firewall Management

### Creating Firewall Rules

<Steps>
  <Step title="Access network management">
    Navigate to your server dashboard and click on the "Network" tab.
  </Step>

  <Step title="Configure firewall rule">
    * **Name**: Descriptive name for the rule
    * **Port**: Port number (optional - if not provided, applies to all ports)
    * **IP Address**: IP address or range (optional - if not provided, applies to all IPs)
    * **Rule Type**: Allow or deny
  </Step>

  <Step title="Create rule">
    Click "Create" to create the firewall rule. It will be automatically applied to the server.
  </Step>
</Steps>

### Firewall Rule Logic

<AccordionGroup>
  <Accordion title="Port + IP Address">
    Rule applies to specific port from specific IP address.
  </Accordion>

  <Accordion title="Port Only">
    Rule applies to specific port from any IP address.
  </Accordion>

  <Accordion title="IP Address Only">
    Rule applies to any port from specific IP address.
  </Accordion>
</AccordionGroup>

<Warning>
  You must specify either a port or IP address (or both). Rules cannot be created without at least one.
</Warning>

## Load Balancer Configuration

### Setting Up Load Balancing

<Steps>
  <Step title="Access load balancer">
    In the network interface, locate the "Load Balancer" section (only visible for load balancer servers).
  </Step>

  <Step title="Select backend servers">
    Choose from available web servers to add to your load balancer:

    * **Server Selection**: Pick servers from your available web servers
    * **Connection**: Click the plus icon to add server to load balancer
  </Step>

  <Step title="Remove servers">
    Click the delete icon to remove servers from the load balancer.
  </Step>
</Steps>

<Warning>
  Servers connected to sites cannot be removed from the load balancer. Remove site connections first.
</Warning>

## Network Security

### Security Best Practices

* **Principle of Least Privilege**: Only open ports and allow IPs that are necessary
* **Default Deny**: Start with restrictive firewall and add rules as needed
* **Regular Review**: Periodically review and audit firewall rules

### Common Firewall Rules

<CardGroup cols={3}>
  <Card title="Web Traffic" icon="globe">
    Allow HTTP (80) and HTTPS (443) from any source for public web access.
  </Card>

  <Card title="SSH Access" icon="key">
    Restrict SSH (22) to specific IP addresses for security.
  </Card>

  <Card title="Database Access" icon="database">
    Allow database ports only from application servers.
  </Card>
</CardGroup>
