Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device.
Atlassian cookies and tracking notice, (opens new window)
Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
🔍 Discover Our Product Documentation

Barracuda XDR
Results will update as you type.
  • Barracuda XDR Dashboard Basics
  • Using Bailey AI Assistant in Barracuda Managed XDR
  • Introduction to the XDR Dashboard
  • Integrations
  • Working with the Security Operations Center
  • Reporting
  • Securing the Cloud
  • Securing Email
  • Securing Endpoints
  • Infrastructure
    • Working with the Collectors Page
      • Setting up the XDR Collector
        • Setting up the XDR Collector for Linux
          • Setting up the Barracuda XDR Collector for Barracuda IDS for Linux
            • Installing Suricata on Linux for the XDR Collector
              • Configuring a Static IP in Ubuntu
        • Troubleshooting the XDR Collector
        • Setting up the XDR Collector for Windows
        • Generating the token to enroll the BX500 hardware device
      • Filtering the Collectors Page
  • Securing Networks
  • Viewing security vulnerabilities
  • Administration
  • Barracuda Managed Vulnerability Security
  • Setting up new customer accounts

    You‘re viewing this with anonymous access, so some content might be blocked.
    /
    Configuring a Static IP in Ubuntu
    Published May 14

    Configuring a Static IP in Ubuntu

    May 14, 2026
    Subscribe

    Prerequisites

    You need the following to configure a Static IP in Ubuntu for the Barracuda XDR Elastic Collector:

    • An Ubuntu installation

    • sudo rights to modify system configuration files

    • (Optional) – join to domain

    • Familiarity with the Vim text editor

    • Familiarity with Netplan (Required for newer Ubuntu environments)

    For more information, see https:https://ubuntu.com/server/docs/network-configuration

    When configure a static IP in Ubuntu, you'll need to follow these procedures:

    • To collect information on the current network

    • To configure the network

    • To test and apply your changes

    To collect information on the current network

    You'll need to collect details of the current network configuration so you can make the necessary changes to your configuration. In this procedure, you'll gather the following:

    • Available adapters

    • Respective IP information

    You may also want to verify your default gateway configuration.

    1. Log in as an Administrator with sudo rights.

    2. Run the following command to collect the details of the available adapters and respective IP information:
      sudo ip a
      The results look like the following:
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
          link/ether 00:16:3e:e2:52:42 brd ff:ff:ff:ff:ff:ff link-netnsid 0
          inet 192.168.0.2/24 brd 192.168.0.255 scope global dynamic eth0
             valid_lft 3257sec preferred_lft 3257sec
          inet6 fe80::216:3eff:fee2:5242/64 scope link
             valid_lft forever preferred_lft forever

    3. Make a note of the following to use in the next procedure:

      • Network adapter (in the example above, the network adapter is eth0)

      • Current IP address (in the example above, the IP address is 192.168.0.2/24)

        You can use the current IP address to configure a static IP, or you can choose a different one within the host IP range. The procedure below includes instructions for choosing a different IP.

    4. Optionally, run the following command to verify your default gateway configuration:

      sudo ip route show
      The results look like the following:
      default via 192.168.0.1 dev eth0 proto dhcp src 192.168.0.2 metric 100

    5. Make a note of the default gateway (in the example above, the default gateway is 192.168.0.1).

    To configure the network

    Netplan is the default network management tool for the latest Ubuntu versions. Configuration files for Netplan are written using YAML and end with the extension .yaml.

    One of the most common errors in configuration files is misplaced spaces. Be aware that configuration files read spaces as part of the syntax. Your file won't be read properly if you don't use the proper indentation.

    1. Use the following command to list the files in the /etc/netplan directory:

      ls /etc/netplan

    2. Make a note of the existing configuration file if there is one.

    3. Run one of the following commands:

      • To update the configuration file:
        sudo vim /etc/netplan/[config.yaml], where [config.yaml] is the name of the existing configuration file from step 2 above.

      • To create the configuration file is one doesn't exist:
        sudo vim /etc/netplan/01-netcfg.yaml
        01-netcfg.yaml will be the filename of the created configuration file.

    4. Open the configuration file and edit the file with one of the following configurations:

      • For Ubuntu environments Ubuntu Bionic 18.04 LTS and older:
        network:
          version: 2
          renderer: networkd
          ethernets:
            [ethX]:
              addresses:
                - [XXX.XXX.X.XXX/XX]
              gateway4:  [XXX.XXX.X.X]
              nameservers:
                  addresses: [X.X.X.X, X.X.X.X]
        Where [ethX] is your network adapter and [XXX.XXX.X.XXX/XX] is the current IP address from step 1;[XXX.XXX.X.X] is the default gateway from step 4, and [X.X.X.X, X.X.X.X] are the nameserver addresses.

      • For newer Ubuntu environments:
        network:
          version: 2
          renderer: networkd
          ethernets:
            [ethX]:
              addresses:
                - [XXX.XXX.X.XXX/XX]
              routes:
                - to: default
                  via: [XXX.XXX.X.X]
              nameservers:
                  addresses: [X.X.X.X, X.X.X.X]
        Where [ethX] is your network adapter and [XXX.XXX.X.XXX/XX] is the current IP address from step 1;[XXX.XXX.X.X] is the default gateway from step 4, and [X.X.X.X, X.X.X.X] are the nameserver addresses.

    5. Save the file.

    To test and apply your changes

    1. Run the following command: 

      sudo netplan try

    2. Do one of the following:

      • If this command runs with no errors, confirm you want to apply the settings.

      • If the command runs with errors, fix the errors and repeat step 1.

    3. Run the following command to verify the static IP has been applied:
      sudo ip a
      You will see results similar to the following:
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host 
            valid_lft forever preferred_lft forever
      2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
          link/ether 00:16:3e:e2:52:42 brd ff:ff:ff:ff:ff:ff link-netnsid 0
          inet 192.168.0.100/24 brd 192.168.0.255 scope global dynamic eth0
             valid_lft 3257sec preferred_lft 3257sec
          inet6 fe80::216:3eff:fee2:5242/64 scope link
             valid_lft forever preferred_lft forever


    We value your feedback.
    If you have questions, suggestions, or feedback on our documentation, contact the Campus Product Documentation team.
    For general product inquiries or technical support, please contact the global Barracuda Support team.

    {"serverDuration": 11, "requestCorrelationId": "4c97ca93b2584ebc84779f1c0f33d285"}