Kali Linux Revealed




Download 11,68 Mb.
Pdf ko'rish
bet68/174
Sana15.01.2024
Hajmi11,68 Mb.
#137314
1   ...   64   65   66   67   68   69   70   71   ...   174
Bog'liq
Kali-Linux-Revealed-2021-edition

Example 5.1 Static Configuration in
/etc/systemd/network/50-static.network
[Match]
Name=enp2s0
[Network]
Address=192.168.0.15/24
Gateway=192.168.0.1
DNS=8.8.8.8
Example 5.2 DHCP-based Configuration in
/etc/systemd/network/80-dhcp.network
[Match]
Name=en*
[Network]
DHCP=yes
Note that
system-networkd
is disabled by default, so if you want to use it, you should enable it.
It also depends on
systemd-resolved
for proper integration of DNS resolution, which in turn
requires you to replace
/etc/resolv.conf
with a symlink to
/run/systemd/resolve/resolv.
conf
, which is managed by
systemd-resolved
.
systemctl enable systemd-networkd
systemctl enable systemd-resolved
systemctl start systemd-networkd
systemctl start systemd-resolved
ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
Although
systemd-networkd
suffers from some limitations, like the lack of integrated support
for wireless networks, you can rely on a pre-existing external
wpa_supplicant
configuration for
wireless support. However, it is particularly useful in containers and virtual machines, and was
originally developed for environments in which a container’s network configuration depended on
its host’s network configuration. In this scenario,
systemd-networkd
makes it easier to manage
both sides in a consistent manner while still supporting all sorts of virtual network devices that
you might need in this type of scenario (see
systemd.netdev(5)
in section 
6.1.1
, “
Manual Pages

[page 128]).
111
Chapter 5 — Configuring Kali Linux



Download 11,68 Mb.
1   ...   64   65   66   67   68   69   70   71   ...   174




Download 11,68 Mb.
Pdf ko'rish