Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Help about MediaWiki
FUTO
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Introduction to a Self Managed Life: a 13 hour & 28 minute presentation by FUTO software
(section)
Main Page
Discussion
English
Read
Edit
Edit source
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
Edit source
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Step 3: Create a New Netplan Configuration === Since you disabled cloud-init, you can now modify the network configuration to create a bridge interface that your virtual machines can use. # Find the name of your ethernet interface (the one the CAT5 cable plugs into): <pre>[louis@livingroombauer ~]$ ls /sys/class/net enp4s0 lo</pre> In my personal computer, <code>enp4s0</code> is my network interface, and <code>lo</code> is the '''loopback''' interface. '''loopback''' allows the machine to talk to itself - other computers cannot contact this computer through the loopback interface. This is useful if there is a service we would like to run that we do not want to be accessible to other machines on the network. <code>enp4s0</code> is my ethernet port. On my '''server''', <code>eno1</code> is my interface that the ethernet port plugs into, so I will use that below. When you see me using <code>eno1</code> as I set up my server, replace <code>eno1</code> with the actual name of your network interface. <ol style="list-style-type: decimal;"> <li><p>Create or edit the Netplan configuration file by running this command:</p> <pre>sudo nano /etc/netplan/01-netcfg.yaml</pre></li> <li><p>Replace the content with the following configuration. I’ve added a comment on each line so you know how many spaces there should be:</p> <pre>network: # 0 spaces version: 2 # 4 spaces renderer: networkd # 4 spaces ethernets: # 4 spaces eno1: # 8 spaces dhcp4: no # 12 spaces bridges: # 4 spaces br0: # 8 spaces dhcp4: no # 12 spaces addresses: # 12 spaces - 192.168.5.2/24 # 16 spaces nameservers: # 12 spaces addresses: # 16 spaces - 192.168.5.1 # 20 spaces routes: # 12 spaces - to: default # 16 spaces via: 192.168.5.1 # 18 spaces interfaces: # 12 spaces - eno1 # 16 spaces</pre></li> <li><p>Once done, remember to change the permissions of your netplan file so netplan does not yell at you:</p> <pre>sudo chmod 600 /etc/netplan/01-netcfg.yaml</pre></li></ol> <blockquote>'''Explanation of the Configuration:''' - <code>eno1</code> will be part of the bridge (<code>br0</code>), but will no longer have an IP address directly. - <code>br0</code> is the bridge interface that will be assigned the static IP <code>192.168.5.2</code>. - The <code>br0</code> interface will be configured with the same gateway and nameserver settings as before. The gateway is our pfSense router, which is what it connects to to get an IP address and connect to the internet (a “gateway” to the world), and the nameserver is also our router, which is what it connects to to translate things like google.com into <code>142.250.138.101</code>. - <code>br0</code> is a virtual interface WE are creating. <code>eno1</code> is an interface already present on this machine. <code>eno1</code> is the ethernet port on my computer, simply put. '''Your network interface card will most likely be called something else; this is ok! Use what your network interface is called as it will be different for all machines''' </blockquote> <blockquote>'''NOTE:''' You are probably used to old school configuration files where: <code>pasv_enable=YES</code> is the same as <code>pasv_enable=YES</code> That is not how a YAML do. A single space is all that stands between you having a working setup & happiness, and total misery. YAML is sensitive to spaces; indentation errors matter, and can cause the config file to not work. Some text editors are helpful in editing yaml files so that it is easier to notice mistakes & errors. Some are not. </blockquote> <span id="step-4-apply-the-new-configuration"></span>
Summary:
Please note that all contributions to FUTO may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
FUTO:Copyrights
for details).
Do not submit copyrighted work without permission!
To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:
Cancel
Editing help
(opens in new window)