Overview
This is the sixth post in a multi-part series that illustrates how to customize the Windows installer media to automate the process of installing a Windows AD domain controller, a Windows file server, and a Windows desktop environment. This article details the process for installing the Linux router that provides simple Network Address Translation (“NAT”) and firewall capabilities.
- Introduction
- Architecture
- Prerequisites
- Create the Virtual Machines
- Customize the Windows installer ISOs
- Install the Linux Router
- Install the Windows Systems
- Conclusion
Install the Linux Router
- In Hyper-V Manager, select
AD Lab 01 router.contoso.com
and edit settings. - Click Add Hardware, select Network Adapter, click Add, and set Virtual switch to
AD Lab Private
. - Start the virtual machine and perform a minimal installation of AlmaLinux 9.5:
- Set the time zone to GMT.
- Set the
root
user password toADL@b$ecurePassw0rd
- Wait for the installation to complete, then log in as
root
. - Run
nmtui
to configure and activate theeth1
network adapter:
IP Address: 172.16.1.1
Subnet Mask: 255.255.255.0 - Run the following commands to configure NAT:
echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf
rm -rf /etc/firewalld/zones
firewall-cmd --zone=public --set-target=ACCEPT --permanent
firewall-cmd --complete-reload firewall-cmd --zone=public --add-forward
firewall-cmd --zone=public --add-rich-rule='rule family=ipv4 source address=172.16.1.0/24 masquerade'
firewall-cmd --runtime-to-permanent
- Run the following commands to apply all updates and enable automagic updates:
dnf -y update
dnf -y install dnf-automatic
systemctl enable --now dnf-automatic.timer
- Shut down.
Export the VM
Export the VM to your Downloads directory.
Relevant Links
Previous: Customize the Windows installer ISOs
Install the Linux Router