Reader small image

You're reading from  Mastering Ubuntu Server - Fourth Edition

Product typeBook
Published inSep 2022
PublisherPackt
ISBN-139781803234243
Edition4th Edition
Concepts
Right arrow
Author (1)
Jay LaCroix
Jay LaCroix
author image
Jay LaCroix

Jeremy "Jay" LaCroix is a technologist and open-source enthusiast, specializing in Linux. He has a net field experience of 20 years across different firms as a Solutions Architect and holds a master's degree in Information Systems Technology Management from Capella University. In addition, Jay also has an active Linux-focused YouTube channel with over 250K followers and over 20M views, available at LearnLinuxTV, where he posts instructional tutorial videos and other Linux-related content. He has also written Linux Mint Essentials and Mastering Linux Network Administration, published by Packt Publishing.
Read more about Jay LaCroix

Right arrow

Setting Up Network Services

In Chapter 10, Connecting to Networks, we went over some important foundational topics related to networking. We saw how to set the hostname, manage network interfaces, configure connections, and more. In this chapter, we’ll revisit networking, specifically to set up the resources that will serve as the foundation of our network. The majority of this chapter will focus on setting up the DHCP and DNS servers, which are very important components of any network. In addition, we’ll even take a look at setting up a server to act as an internet gateway for the rest of our network.

Along the way, we’ll cover the following topics:

  • Planning your IP address scheme
  • Serving IP addresses with isc-dhcp-server
  • Setting up DNS with bind
  • Setting up an internet gateway

As a Linux administrator, you may or may not be tasked with designing the entire network layout of your organization; often there will be an already...

Planning your IP address scheme

Designing the overall layout of your network is an incredibly important process that sets the stage for success or failure later on. This design must take into consideration the needs of the organization, the need for efficient methods of communication, and the segregation of network services to ensure that your servers can only communicate with the resources that they are supposed to. As a Linux administrator that manages a fleet of Ubuntu servers, it’s not always the case that you’ll even have a say in the network layout at all. It’s quite common that you “inherit” a network designed by a previous administrator, or your job is siloed such that you only manage the servers and someone else is responsible for the network.

Since this is primarily a book that focuses on teaching you how to manage Ubuntu servers, we aren’t going to cover all of the things that a network administrator would need to know, but...

Setting up a DHCP server for serving IP addresses

Most network appliances you purchase nowadays often come with their own DHCP server and allow you to configure it via a web console. Often, this is totally fine and meets your needs. In my experience though, network appliances you purchase can be very hit and miss. Some of them are great, while others are not so impressive. One of the main problems is that manufacturers will often stop supporting the hardware prematurely, exposing your network to unpatched vulnerabilities. It’s important to always purchase network hardware that’s as future-proof as possible. Or, you can set up your own router with the features that you need. Although the burden of management is placed on you, this gives you ultimate flexibility. Ubuntu servers make great DHCP servers, and rolling your own server is actually easier than it sounds. And that’s exactly what we’re going to work through in this section.

First, the server that...

Adding a DNS server

I’m sure most of you are familiar with the purpose of a Domain Name System (DNS) server. Its simplest definition is that it’s a service that’s responsible for matching an IP address to a domain or hostname. When you’re connected to the internet, name-to-IP matching happens constantly as you browse. After all, it’s much easier to connect to https://www.google.com/ using its domain name than it is to remember its IP address.

When you connect to the internet, your workstation or server will connect to an external DNS server in order to figure out the IP addresses for the websites you attempt to visit.

It’s also very common to run a local DNS server internally in your organization. The benefit is that you’ll be able to resolve your local hostnames as well, something that an external DNS server would know nothing about. For example, if you have an intranet site that you intend to make available to your co-workers...

Setting up an internet gateway

As long as we’re setting up network services, we may as well go all the way and set up a router to act as a gateway for our network. A gateway within a network is the device you go through to route from one network to another. In this context, the internet gateway will be the device that sits between your local network and the device that provides your internet connection (such as a cable modem). The gateway in a typical network is usually a commercial router or firewall, which often also provides DNS, DHCP, and routing services as well.

If you already have such a device on your network providing these services, then there’s nothing for you to do. You can skip this section. But if you’d like to set up your own router, then feel free to proceed.

If you’d like to proceed and set up a router, then the first order of business is to decide which device on your network will serve that purpose. Often, administrators will...

Summary

In this chapter, we explored additional networking topics. We started off with some notes on planning an IP address scheme for your network so that you could create groups for the different types of nodes, such as servers and network equipment, and plan a pool of addresses for DHCP. We also worked through the process of setting up a DHCP and DNS server, which gives us additional flexibility when configuring the services we run on our network, such as when defining a custom IP scheme for DHCP, as well as giving us the ability to resolve the hostnames of devices on our network by name. We closed off this chapter with a discussion on setting up an internet gateway to serve as our internet-facing router.

In the next chapter, we’ll take a look at sharing and transferring files over the network. This will include covering NFS and Samba shares, as well as using scp, rsync, and sshfs. Stay tuned!

Further reading

Join our community on Discord

Join our community’s Discord space for discussions with the author and other readers:

https://packt.link/LWaZ0

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Mastering Ubuntu Server - Fourth Edition
Published in: Sep 2022Publisher: PacktISBN-13: 9781803234243
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Jay LaCroix

Jeremy "Jay" LaCroix is a technologist and open-source enthusiast, specializing in Linux. He has a net field experience of 20 years across different firms as a Solutions Architect and holds a master's degree in Information Systems Technology Management from Capella University. In addition, Jay also has an active Linux-focused YouTube channel with over 250K followers and over 20M views, available at LearnLinuxTV, where he posts instructional tutorial videos and other Linux-related content. He has also written Linux Mint Essentials and Mastering Linux Network Administration, published by Packt Publishing.
Read more about Jay LaCroix