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

# Network configuration

> Additional IPv4, IPv6, and manual network setup

<Warning>
  The network is already configured when the server is provisioned and works out of the box. You rarely edit the configs by hand — mostly to add an additional IPv4 or set up IPv6. A mistake in the network config can cut off SSH access: change one parameter at a time and immediately check access from a second window without closing your current session. As a last resort, reinstalling the system will bail you out (it wipes data).
</Warning>

## Additional IPv4

There's no button in the bot to order an extra IP — an additional IPv4 is issued [through support @lumisup\_robot](https://t.me/lumisup_robot). Once they send you the address, netmask, and gateway, set them in the OS.

<Tabs>
  <Tab title="Ubuntu (Netplan)">
    Modern Ubuntu uses Netplan. The config lives in `/etc/netplan/` (a file like `01-netcfg.yaml` or `50-cloud-init.yaml`). Check the interface name with `ip a` (often `eth0` or `ens3`) and add the second address to the `addresses` list:

    ```yaml /etc/netplan/01-netcfg.yaml theme={"system"}
    network:
      version: 2
      ethernets:
        eth0:
          addresses:
            - 192.0.2.10/24
            - 192.0.2.11/24
          routes:
            - to: default
              via: 192.0.2.1
          nameservers:
            addresses:
              - 1.1.1.1
              - 8.8.8.8
    ```

    Here `192.0.2.10` is the primary IP and `192.0.2.11` is the added one. Substitute your own values.

    Check the syntax and apply:

    ```bash theme={"system"}
    netplan try
    netplan apply
    ```

    <Tip>
      `netplan try` applies the config temporarily and automatically rolls it back after 120 seconds if you don't confirm. Handy for not losing access over a typo.
    </Tip>
  </Tab>

  <Tab title="Debian (interfaces)">
    On Debian 12, the `eth0:0` alias method via `/etc/network/interfaces` may not work — it depends on what manages the network (ifupdown, systemd-networkd, or NetworkManager). The safer approach is to first test with `ip addr add` and then decide how to make it permanent.

    Temporarily (until reboot):

    ```bash theme={"system"}
    sudo ip addr add 192.0.2.11/24 dev eth0
    ```

    Confirm the address came up (`ip a`) and check that the server is reachable from outside.

    <Note>
      Making it permanent depends on the distro's network stack: ifupdown, systemd-networkd, or NetworkManager — each has its own way. If you're unsure about your configuration, ask support [@lumisup\_robot](https://t.me/lumisup_robot): an additional IPv4 in Lumi is issued through support anyway, and they'll help with the setup too.
    </Note>
  </Tab>

  <Tab title="Windows">
    On Windows Server, an extra IP is added through the adapter properties:

    <Steps>
      <Step title="Open the adapter settings">
        `Win + R` → `ncpa.cpl` → right-click the network adapter → **Properties**.
      </Step>

      <Step title="Open the IPv4 settings">
        Select **Internet Protocol Version 4 (TCP/IPv4)** → **Properties** → **Advanced**.
      </Step>

      <Step title="Add the IP">
        In the **IP addresses** section, click **Add**, enter the address and subnet mask you were given. Save the changes.
      </Step>
    </Steps>
  </Tab>
</Tabs>

## IPv6

If you've been given an IPv6 address and gateway, set them up the same way.

<Tabs>
  <Tab title="Ubuntu (Netplan)">
    ```yaml /etc/netplan/01-netcfg.yaml theme={"system"}
    network:
      version: 2
      ethernets:
        eth0:
          addresses:
            - "2001:db8:abcd::2/64"
          routes:
            - to: "::/0"
              via: "2001:db8:abcd::1"
    ```

    `to: "::/0"` is the default route for IPv6 (the equivalent of `default` for IPv4). Apply with `netplan apply`.
  </Tab>

  <Tab title="Debian (interfaces)">
    ```bash /etc/network/interfaces theme={"system"}
    iface eth0 inet6 static
        address 2001:db8:abcd::2
        netmask 64
        gateway 2001:db8:abcd::1
    ```

    Apply: `systemctl restart networking`.
  </Tab>
</Tabs>

Check that IPv6 came up and connectivity works:

```bash theme={"system"}
ip -6 a
ping6 -c 4 google.com
```

## Check the network

<Steps>
  <Step title="Check addresses and interfaces">
    ```bash theme={"system"}
    ip a
    ```
  </Step>

  <Step title="Look at the routing table">
    ```bash theme={"system"}
    ip route
    ```
  </Step>

  <Step title="Check connectivity to the outside">
    ```bash theme={"system"}
    ping -c 4 1.1.1.1
    ```
  </Step>

  <Step title="Diagnose packet loss (MTR)">
    If the connection keeps dropping, look at the route with MTR (it combines `ping` and `traceroute`):

    ```bash theme={"system"}
    apt install mtr-tiny
    mtr 1.1.1.1
    ```
  </Step>
</Steps>

<CardGroup cols={3}>
  <Card title="Firewall (ufw)" icon="shield-halved" href="/en/vps/firewall">
    Open the ports you need, close off the rest.
  </Card>

  <Card title="Reverse DNS (PTR)" icon="arrows-turn-to-dots" href="/en/vps/reverse-dns">
    A reverse record for your IP.
  </Card>

  <Card title="VPS not working" icon="triangle-exclamation" href="/en/vps/troubleshooting">
    Access, load, IP on blocklists.
  </Card>
</CardGroup>
