Download as pdf or txt
Download as pdf or txt
You are on page 1of 35

LINUX NETWORKING & SECURITY

FUNDAMENTALS

Welcome Everyone!
Day 1 covers Linux Networking Fundamentals
Day 2 covers Linux Security Fundamentals

1
DAVE PROWSE | HTTPS://PROWSE.TECH
DISCLAIMER & WARNING

The information contained in this webinar is for educational


purposes only. The author, O’Reilly, Pearson, or any other entity
is not responsible for any misuse of the information.

Practice the concepts provided in this training course on systems


that you own, or have authorization to use.

Do not attempt any of the procedures on live work systems or


production systems.

2
DAVE PROWSE | HTTPS://PROWSE.TECH
AGENDA

DAY 1 – LINUX NETWORKING FUNDAMENTALS


PART I Networking 101
PART II Networking Services & Configuration Files
PART III Network Commands & Configurations
PART IV Connecting Between Hosts with the Command Line
PART V Wrap-up

3
DAVE PROWSE | HTTPS://PROWSE.TECH
The Network
Map

4
DAVE PROWSE | HTTPS://PROWSE.TECH
K !
O R
-W
P in.
R E Take 5 minutes to complete your set up:
P 5m - Debian server (no GUI please!)

- Whichever Linux client you prefer

- Feel free to ask questions in the Q&A widget

5
DAVE PROWSE | HTTPS://PROWSE.TECH
Audience Poll

How would you rate your Linux skills?

A. Beginner
B. Been playing around with it for a while
C. Intermediate
D. Advanced
E. Master of the Universe

6
Audience Poll

Which virtualization platform are you using today?

A. VirtualBox
B. VMware Workstation
C. ESXi
D. Hyper-V
E. KVM (libvirt)
F. Vagrant
G. Parallels
H. Xen
I. Proxmox
J. Other

7
PART I

NETWORKING 101

8
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I WHAT IS A COMPUTER NETWORK?
Networking
101

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP

9
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I WHAT IS THE PURPOSE?
Networking
101

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP

u c tivi ty.
…p r o d
a word
I n

10
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I TCP/IP
Networking
101
A suite of communication protocols that allows
computers to talk to each other by way of IP address.

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP

11
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I TYPICAL TCP/IP
Networking
101

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP

12
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I THE OSI MODEL
Networking
101 A seven layer model used
to define how data
transmission works.

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP Application Application
Presentation Presentation
Session Session
Transport Transport
Network Network
Data Link Data Link
Physical Physical

13
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I THE OSI MODEL
Networking
101

THE BASICS
Layer # Name
TCP/IP & OSI
Layer 7 Application
THE NETWORK Layer 6 Presentation
MAP Layer 5 Session
Layer 4 Transport
Layer 3 Network
Layer 2 Data Link
Layer 1 Physical

14
DAVE PROWSE | HTTPS://PROWSE.TECH
PART I OSI MODEL vs. TCP/IP MODEL
Networking
101
OSI Reference Model TCP/IP Model

7 Application
THE BASICS
6 Presentation Application
TCP/IP & OSI 5 Session

4 Transport Transport
THE NETWORK
MAP 3 Network Internet

2 Data Link
Link
1 Physical

15
DAVE PROWSE | HTTPS://PROWSE.TECH
Quiz Question

Which layer of the OSI model is responsible for the transmission of IP packets
from one IP address to another?

A. transport
B. data link
C. network
D. application

16
PART I
Networking
101

THE BASICS

TCP/IP & OSI

THE NETWORK
MAP

17
DAVE PROWSE | HTTPS://PROWSE.TECH
PART II

NETWORKING SERVICES &


CONFIGURATION FILES
18
DAVE PROWSE | HTTPS://PROWSE.TECH
PART II
networking.service
Networking
Services & Location of configuration file:
Configuration Files /etc/network/interfaces

A Tale of Three systemd-networkd.service


Networking Locations of configuration files:
Services
Ubuntu Server: /etc/netplan
networking Other distros: /etc/systemd/network

networkd NetworkManager.service

NetworkManager Locations of configuration files:

RHEL/CentOS distros:
/etc/sysconfig/network-scripts
Other distros:
/etc/NetworkManager/system-connections
19
DAVE PROWSE | HTTPS://PROWSE.TECH
PART II
Networking
Services &
networking.service
Configuration Files - Common in Debian (as a server).

- To see if it is active, type:

A Tale of Three systemctl status networking.service


Networking
Services or

service networking status


networking
or
networkd
/etc/init.d/networking status
NetworkManager - Location of configuration file:
/etc/network/interfaces

- Demonstration

20
DAVE PROWSE | HTTPS://PROWSE.TECH
PART II
Networking
Services &
Configuration Files systemd-networkd.service

- Used by Ubuntu Server and in some special situations.


A Tale of Three
Networking - To see if it is active, type:
Services systemctl status systemd-networkd

networking
- Location of configuration file:
Ubuntu Server: /etc/netplan
networkd Other distros: /etc/systemd/network

NetworkManager - Demonstration #1: Ubuntu Server

- Demonstration #2: Debian running networkd

21
DAVE PROWSE | HTTPS://PROWSE.TECH
PART II
Networking NetworkManager.service
Services & - Used by Fedora/RHEL/CentOS as well as the majority of
Configuration Files Linux desktop distributions today (by default).

- To see if it is active, type:

A Tale of Three systemctl status NetworkManager


Networking
Services - Can be configured with a variety of tools:
- Settings, nm-connection-editor, nmtui, nmcli, the conf.
file, and cockpit.
networking
- Locations of configuration files:
networkd
RHEL/CentOS distros:
/etc/sysconfig/network-scripts
NetworkManager
Other distros:
/etc/NetworkManager/system-connections

- Demonstration #1: Fedora & CentOS


- Demonstration #2: Debian client (optional)

22
DAVE PROWSE | HTTPS://PROWSE.TECH
Quiz Question

Where would you go to modify the default network configuration of a Debian


server?

A. /etc/sysconfig/network-scripts
B. Netplan
C. /etc/network/interfaces
D. /etc/systemd/network

23
PART III

NETWORK COMMANDS &


CONFIGURATIONS
24
DAVE PROWSE | HTTPS://PROWSE.TECH
PART III
Networking
Commands &
Configurations Command Description
ip link shows Ethernet connections

ip and ping ip a shows Ethernet plus TCP/IP


information
hostname and DNS
ip route shows routed connections including
the default gateway
nmcli
ping <hostname> displays if a host is alive on the
or <ipaddress> network
ping -c specifies the amount of ICMP echos
to send
ping -s specifies the packetsize

25
DAVE PROWSE | HTTPS://PROWSE.TECH
PART III
Networking
Commands & Two good ways to modify hostnames:
Configurations
hostnamectl set-hostname <hostname>

ip and ping vim /etc/hostname

hostname and DNS

nmcli

Two locations for DNS:

/etc/resolv.conf

/etc/systemd/resolved.conf

26
DAVE PROWSE | HTTPS://PROWSE.TECH
PART III
Networking
Commands & nmcli command Description
Configurations
nmcli Displays the network configuration
nmcli con show Displays the available
ip and ping NetworkManager connections

hostname and DNS nmcli con mod Modifies the connection without the
<network-interface> shell
...
nmcli
nmcli con down Brings the network interface down
<network-interface>

nmcli con up Brings the network interface up


<network-interface>

nmcli con edit Opens the nmcli shell


<network-interface>

27
DAVE PROWSE | HTTPS://PROWSE.TECH
Quiz Question

Which of the following describes how to deactivate a network interface in


Fedora?

A. ifup enp1s0
B. ip link
C. nmcli con down ens3
D. vim /etc/resolv.conf

28
PART IV

CONNECTING BETWEEN COMPUTERS


WITH THE COMMAND LINE

29
DAVE PROWSE | HTTPS://PROWSE.TECH
PART IV
Connecting Between
Computers with the
SSH = Secure Shell
Command Line

SSH

SCP (& rsync)

FTP & SFTP

30
DAVE PROWSE | HTTPS://PROWSE.TECH
PART IV
Connecting Between
Computers with the
SCP = Secure Copy
Command Line

SSH

SCP (& rsync)

FTP & SFTP

Example:
scp ubuntu.iso user@10.0.2.55:/home/user/isos

31
DAVE PROWSE | HTTPS://PROWSE.TECH
PART IV
Connecting Between
Computers with the
Command Line
Protocol Full Name Ports used
FTP File Transfer Protocol 21 (control port)
SSH 20 (data port)

SCP (& rsync) FTPS File Transfer Protocol Secure 990 (control port)
989 (data port)
FTP & SFTP
SFTP Secure File Transfer Protocol 22

32
DAVE PROWSE | HTTPS://PROWSE.TECH
Quiz Question

Which of the following are valid command options for transmitting a file securely
between Linux hosts? (Select the two best answers.)

A. ssh
B. ftp
C. scp
D. sftp

33
PART V

WRAP-UP

34
DAVE PROWSE | HTTPS://PROWSE.TECH
LINUX NETWORKING & SECURITY
FUNDAMENTALS

Thank you for attending today.


See you tomorrow!
35
DAVE PROWSE | HTTPS://PROWSE.TECH

You might also like