Lab 1.1 Routing and DMZ - devinziegler/Devin-Tech-Journal GitHub Wiki
This lab acted as an initial setup of the SEC-350 environment. The Following systems will have a base network config and be able to communicate with each other.
rw01 - Xubuntu
system that sits outside the network.
fw01 - vyOS
system that acts as the router in the network, a separate page has been created going over initial setup and helpfull commands, this page can be found here.
web01 - Rocky
system that hosts web server, this system sits inside the DMZ
log01 - Rocky
system that logs activity on the network, for know this system is inside the DMZ.
- Change default password often root password.
passwd root/champuser
- Set system hostname e.x.
hostnamectl set-hostname <hostname>
- Create a new named user e.x. (give them sudo permissions optional)
useradd <username>
passwd <username>
usermod -aG wheel <username>
For debian based distros use
sudo
instead ofwheel
- Properly network the system. This in
xubuntu
this can be done via GUI ornetplan
. ForRocky
orRHEL
based systems, use thenmtui
text UI.
Rocky uses firewalld
as the system firewall. Here is a refresher or firewalld
commands:
- Allowing a port:
firewall-cmd --add-port=<port_number>/<protocol> --permanent
- Applying firewalld commands:
firewall-cmd --reload
Firewalld commands will not take affect until the firewall has been reloaded.
- rw01 needs to forward DMZ traffic to the WAN gateway, edit the network GUI and add this route:
Address | Netmask | Gateway |
---|---|---|
<DMZ_network> | <DMZ_netmask> | <WAN_address_onfw01> |
- Configure ports for log01 / the system that will receive logs:
firewall-cmd --add-port=514/udp --permanent
firewall-cmd --reload
- Uncomment the following lines from the config at
/etc/rsyslog.conf
$ModLoad imudp
$UDPServerRun 514
$ModLoad imtcp
$InputTCPServerRun 514
-
Setup the client by first installing rsyslog using the given package manager.
-
On the client, make a new config file in
/etc/rsyslog.d/<name>.conf
and add the following line:
user.notice @<log_server_address>
- Test the client and server my sending a message from the client:
logger -t test <MESSAGE>
- Look at the incoming message on the log server using by tailing
/var/log
:
tail -f /var/log/messages