Last active
March 31, 2025 22:01
-
-
Save xpr0ger/ff23ec1ece6769c5dae85f3163f2bbe3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -euo pipefail | |
dnf config-manager --set-enabled crb | |
dnf install epel-release -y | |
dnf install --refresh systemd-resolved systemd-networkd -y | |
systemctl enable systemd-networkd | |
systemctl enable systemd-resolved | |
systemctl disable NetworkManager | |
rm /etc/resolv.conf -f | |
ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf | |
mkdir -p /etc/systemd/network | |
cat <<EOF > /etc/systemd/network/00-default.network | |
[Match] | |
Name=enp* | |
[Network] | |
DHCP=ipv4 | |
LLMNR=true | |
MulticastDNS=true | |
EOF | |
cat <<EOF >> /etc/systemd/resolved.conf | |
LLMNR=yes | |
MulticastDNS=yes | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
WARNING:
The script might disable remote access, meaning physical access to the machine could be needed to regain control.
Rocky Linux 9.5+