How to Set Static IP in Ubuntu Server 22.04

KeepItTechie

How to Set Static IP in Ubuntu Server 22.04 by KeepItTechie

The video tutorial explains how to set a static IP address on Ubuntu Server 22.04, which is useful for hosting websites. The instructor explains the steps involved, including finding the server IP address and device name, editing the default DHCP configuration file, creating a new static YAML configuration file, modifying it with the device name and IP address, setting the gateway and DNS servers, and applying the new configuration by running the "sudo netplan apply" command. The video also offers tips and warnings, such as avoiding excessive editing of the configuration file due to YAML sensitivity, verifying the IP configuration after reboot, using physical connection instead of SSH, and adjusting server settings as needed.

00:00:00

In this section, the YouTuber is teaching viewers how to set a static IP address on Ubuntu 22.04 server edition. They explain that while a DHCP connection is created when Ubuntu is installed, a static IP address is useful, especially if hosting websites. The first step is finding out what the IP address of the server is, as well as the device name, which can be done by running the "ip" command. They recommend writing down the device name and available static IP addresses for later use in the configuration file. They also show the default DHCP configuration file and explain that it needs to be edited to set the static IP address.

00:05:00

In this section, the speaker explains how to set a static IP configuration in Ubuntu Server 22.04. Initially, the configuration file is set to DHCP, which uses YAML. However, the speaker demonstrates how to create a backup file and then delete the original configuration file needed. Then a new static YAML configuration file is created with the help of a sample file from the speaker's Github page. The device name and IP address need to be modified in the static configuration file, which can be done by following the speaker's instructions step by step. Finally, we need to enter the command "sudo netplan apply" to apply the new configuration.

00:10:00

In this section of the video, the instructor explains how to set the IP address and the gateway in the Ubuntu Server. The user needs to be aware of their network and assign an IP address outside of their network's range. Additionally, the instructor recommends using Cloudflare's DNS servers for faster website resolution. The instructor warns against editing the configuration file too much since YAML is sensitive to spaces and tabs. Finally, the user needs to run the "sudo netplan apply" command to enforce the new IP address and gateway changes. The instructor mentions that running the command via SSH will lock up the terminal and recommends running it while physically connected to the server via keyboard, mouse, and monitor.

00:15:00

In this section, the speaker discusses how to verify that the static IP configuration works by rebooting the system and checking the IP address using the ip a command in the terminal. They also mention that there are other ways to set a static IP address, such as using the nm client or cli command, but using a configuration file is the easiest way to explain the process. The speaker offers a sample configuration file for viewers to copy and paste, but warns that users must modify it based on their own network setup. They encourage viewers to ask questions and adjust server settings to their liking.

More from
KeepItTechie

No videos found.

Related Videos

No related videos found.

Trending
AI Music

No music found.