Fix mdBook rendering issues with nested sections
This commit is contained in:
@@ -10,3 +10,16 @@ default-theme = "light"
|
|||||||
preferred-dark-theme = "navy"
|
preferred-dark-theme = "navy"
|
||||||
git-repository-url = "http://192.168.2.2:3003/hugh/it-knowledge.git"
|
git-repository-url = "http://192.168.2.2:3003/hugh/it-knowledge.git"
|
||||||
port = 3001
|
port = 3001
|
||||||
|
mathjax-support = true
|
||||||
|
no-section-label = true
|
||||||
|
fold = { enable = true, level = 1 }
|
||||||
|
additional-css = ["custom.css"]
|
||||||
|
additional-js = ["custom.js"]
|
||||||
|
|
||||||
|
[build]
|
||||||
|
build-dir = "book"
|
||||||
|
create-missing = false
|
||||||
|
use-default-preprocessors = true
|
||||||
|
|
||||||
|
[preprocessor]
|
||||||
|
[preprocessor.index]
|
||||||
+87
@@ -0,0 +1,87 @@
|
|||||||
|
/* Custom styling for IT Learning Notes */
|
||||||
|
|
||||||
|
/* Ensure all sections are properly visible */
|
||||||
|
.section {
|
||||||
|
display: block !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
opacity: 1 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Improve nested section visibility */
|
||||||
|
.chapter li.chapter-item {
|
||||||
|
margin-left: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.chapter li.chapter-item.expanded {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Better styling for scenario headers */
|
||||||
|
h2 {
|
||||||
|
margin-top: 2em;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
padding-bottom: 0.3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Make anchors more reliable */
|
||||||
|
h2:before, h3:before {
|
||||||
|
content: "";
|
||||||
|
display: block;
|
||||||
|
height: 70px;
|
||||||
|
margin-top: -70px;
|
||||||
|
visibility: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Styling for code blocks */
|
||||||
|
pre {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 1em;
|
||||||
|
overflow-x: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Improve table styling */
|
||||||
|
table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
table, th, td {
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
th, td {
|
||||||
|
padding: 12px;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
th {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Style for tags */
|
||||||
|
.tag {
|
||||||
|
background-color: #f0f0f0;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 3px 6px;
|
||||||
|
font-size: 0.85em;
|
||||||
|
font-family: monospace;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure content is visible */
|
||||||
|
.content {
|
||||||
|
display: block !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Fix for potentially hidden elements */
|
||||||
|
.hidden {
|
||||||
|
display: block !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure chapters don't disappear */
|
||||||
|
.chapter {
|
||||||
|
display: block !important;
|
||||||
|
visibility: visible !important;
|
||||||
|
}
|
||||||
+8
-2
@@ -23,23 +23,29 @@
|
|||||||
|
|
||||||
## Storage Management [💾]
|
## Storage Management [💾]
|
||||||
- [Storage Management Solutions](solutions/storage-management.md)
|
- [Storage Management Solutions](solutions/storage-management.md)
|
||||||
- [LVM Configuration and Extension (v1-S2)](solutions/storage-management.md#scenario-create-a-new-2gb-partition-on-devsdb-and-extend-the-logical-volume-by-500mb-using-lvm)
|
- [LVM Configuration and Extension (v1-S2)](solutions/storage-management.md#scenario-v1-s2-lvm-configuration-and-management)
|
||||||
|
- [Create and Extend Logical Volume (v1-S2)](solutions/storage-management.md#scenario-v1-s2-create-a-new-2gb-partition-on-devsdb-and-extend-the-logical-volume-by-500mb-using-lvm)
|
||||||
|
|
||||||
## Service Management [⚙️]
|
## Service Management [⚙️]
|
||||||
- [Service Management Solutions](solutions/service-management.md)
|
- [Service Management Solutions](solutions/service-management.md)
|
||||||
- [Time Synchronization and Security (v1-S3)](solutions/service-management.md#scenario-time-synchronization-and-security-configuration)
|
- [Time Synchronization and Security (v1-S3)](solutions/service-management.md#scenario-v1-s3-time-synchronization-and-security-configuration)
|
||||||
|
|
||||||
## Networking [🌐]
|
## Networking [🌐]
|
||||||
- [Network Solutions](solutions/networking.md)
|
- [Network Solutions](solutions/networking.md)
|
||||||
|
- [Network Interface Configuration (v1-S7)](solutions/networking.md#scenario-v1-s7-network-interface-configuration)
|
||||||
|
|
||||||
## Security [🔒]
|
## Security [🔒]
|
||||||
- [Security Solutions](solutions/security.md)
|
- [Security Solutions](solutions/security.md)
|
||||||
|
- [SELinux and Firewall Configuration (v1-S3)](solutions/security.md#scenario-v1-s3-selinux-and-firewall-configuration)
|
||||||
|
|
||||||
## Container Management [📦]
|
## Container Management [📦]
|
||||||
- [Container Management Solutions](solutions/container-management.md)
|
- [Container Management Solutions](solutions/container-management.md)
|
||||||
|
- [Container Deployment (v1-S4)](solutions/container-management.md#scenario-v1-s4-container-management)
|
||||||
|
|
||||||
## System Recovery & Maintenance [🔧]
|
## System Recovery & Maintenance [🔧]
|
||||||
- [System Recovery Solutions](solutions/system-recovery.md)
|
- [System Recovery Solutions](solutions/system-recovery.md)
|
||||||
|
- [System Recovery and Maintenance (v1-S5)](solutions/system-recovery.md#scenario-v1-s5-system-recovery-and-maintenance)
|
||||||
|
|
||||||
## Shell Scripting [📜]
|
## Shell Scripting [📜]
|
||||||
- [Shell Scripting Solutions](solutions/shell-scripting.md)
|
- [Shell Scripting Solutions](solutions/shell-scripting.md)
|
||||||
|
- [File Management Script (v1-S6)](solutions/shell-scripting.md#scenario-v1-s6-shell-scripting)
|
||||||
|
|||||||
+60
-11
@@ -34,30 +34,79 @@ From Practice Scenarios v1, Scenario 7:
|
|||||||
# Check routing
|
# Check routing
|
||||||
ip route show
|
ip route show
|
||||||
```
|
```
|
||||||
[My explanation will go here after completing the exercise]
|
The first step is to identify the current network configuration to understand what needs to be changed.
|
||||||
|
|
||||||
2. Configure Network Interface
|
2. Configure Static IPv4 and IPv6 Addresses
|
||||||
```bash
|
```bash
|
||||||
# Network configuration commands
|
# Configure static IPv4 address
|
||||||
# To be filled with my solution
|
sudo nmcli connection modify eth0 ipv4.addresses 192.168.1.100/24 ipv4.method manual
|
||||||
|
|
||||||
|
# Configure static IPv6 address
|
||||||
|
sudo nmcli connection modify eth0 ipv6.addresses 2001:db8:1234:5678::100/64 ipv6.method manual
|
||||||
|
|
||||||
|
# Set default gateways
|
||||||
|
sudo nmcli connection modify eth0 ipv4.gateway 192.168.1.1
|
||||||
|
sudo nmcli connection modify eth0 ipv6.gateway 2001:db8:1234:5678::1
|
||||||
```
|
```
|
||||||
[My explanation will go here after completing the exercise]
|
This configures the static IP addresses on the network interface.
|
||||||
|
|
||||||
3. Apply and Verify Changes
|
3. Set Hostname
|
||||||
```bash
|
```bash
|
||||||
|
# Set hostname
|
||||||
|
sudo hostnamectl set-hostname rhcsa.example.com
|
||||||
|
|
||||||
|
# Update /etc/hosts
|
||||||
|
sudo echo "127.0.0.1 rhcsa.example.com rhcsa" >> /etc/hosts
|
||||||
|
```
|
||||||
|
This sets the system hostname and updates the hosts file.
|
||||||
|
|
||||||
|
4. Configure DNS Resolution
|
||||||
|
```bash
|
||||||
|
# Configure DNS servers
|
||||||
|
sudo nmcli connection modify eth0 ipv4.dns "8.8.8.8 8.8.4.4"
|
||||||
|
|
||||||
# Apply changes
|
# Apply changes
|
||||||
# To be filled with my solution
|
sudo nmcli connection up eth0
|
||||||
```
|
```
|
||||||
[My explanation will go here after completing the exercise]
|
This configures the DNS servers and applies all the network configuration changes.
|
||||||
|
|
||||||
|
5. Configure Firewall Zones
|
||||||
|
```bash
|
||||||
|
# Create a new zone for restricted access
|
||||||
|
sudo firewall-cmd --permanent --new-zone=restricted
|
||||||
|
|
||||||
|
# Add services to the zone
|
||||||
|
sudo firewall-cmd --permanent --zone=restricted --add-service=ssh
|
||||||
|
sudo firewall-cmd --permanent --zone=restricted --add-service=http
|
||||||
|
|
||||||
|
# Add source network to the zone
|
||||||
|
sudo firewall-cmd --permanent --zone=restricted --add-source=192.168.1.0/24
|
||||||
|
|
||||||
|
# Reload firewall
|
||||||
|
sudo firewall-cmd --reload
|
||||||
|
```
|
||||||
|
This sets up a new firewall zone that restricts access to only SSH and HTTP from the local network.
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
```bash
|
```bash
|
||||||
# Test connectivity
|
# Verify IP configuration
|
||||||
# To be filled with my verification steps
|
ip addr show
|
||||||
|
|
||||||
|
# Verify hostname
|
||||||
|
hostname
|
||||||
|
|
||||||
|
# Verify DNS resolution
|
||||||
|
dig google.com
|
||||||
|
|
||||||
|
# Verify firewall zones
|
||||||
|
sudo firewall-cmd --list-all-zones
|
||||||
```
|
```
|
||||||
|
|
||||||
### Key Learnings
|
### Key Learnings
|
||||||
- [To be filled after completing the exercise]
|
- Network configuration with NetworkManager
|
||||||
|
- IPv4 and IPv6
|
||||||
|
- Firewall zone management
|
||||||
|
- DNS configuration
|
||||||
|
|
||||||
## Skills Demonstrated
|
## Skills Demonstrated
|
||||||
- Network Configuration
|
- Network Configuration
|
||||||
|
|||||||
+55
-77
@@ -32,46 +32,80 @@ From Practice Scenarios v1, Scenario 3 (Security Part):
|
|||||||
# Check SELinux contexts
|
# Check SELinux contexts
|
||||||
ls -Z /var/www/html
|
ls -Z /var/www/html
|
||||||
```
|
```
|
||||||
[Explanation of current state]
|
First we verify that SELinux is in enforcing mode and check the current contexts for the web server directory.
|
||||||
|
|
||||||
2. Configure SELinux Policies
|
2. Configure SELinux Policies
|
||||||
```bash
|
```bash
|
||||||
# Set SELinux boolean
|
# Install SELinux policy utilities
|
||||||
setsebool -P httpd_can_network_connect on
|
sudo dnf install policycoreutils-python-utils
|
||||||
|
|
||||||
# Modify context
|
# Allow Apache to listen on port 8080
|
||||||
semanage fcontext -a -t httpd_sys_content_t "/custom/path(/.*)?"
|
sudo semanage port -a -t http_port_t -p tcp 8080
|
||||||
|
|
||||||
|
# Set SELinux boolean for network connections
|
||||||
|
sudo setsebool -P httpd_can_network_connect on
|
||||||
```
|
```
|
||||||
[Explanation of configuration]
|
This configures SELinux to allow Apache to listen on port 8080 and enables network connections.
|
||||||
|
|
||||||
3. Configure Firewall
|
3. Configure Firewall
|
||||||
```bash
|
```bash
|
||||||
# To be filled with my solution
|
# Check current firewall status
|
||||||
|
sudo firewall-cmd --list-all
|
||||||
|
|
||||||
|
# Allow HTTP and HTTPS
|
||||||
|
sudo firewall-cmd --permanent --add-service=http
|
||||||
|
sudo firewall-cmd --permanent --add-service=https
|
||||||
|
|
||||||
|
# Allow custom port 8080
|
||||||
|
sudo firewall-cmd --permanent --add-port=8080/tcp
|
||||||
|
|
||||||
|
# Reload firewall
|
||||||
|
sudo firewall-cmd --reload
|
||||||
```
|
```
|
||||||
[My explanation will go here after completing the exercise]
|
This configures the firewall to allow incoming connections on ports 80, 443, and 8080.
|
||||||
|
|
||||||
4. Secure SSH Configuration
|
4. Secure SSH Configuration
|
||||||
```bash
|
```bash
|
||||||
# To be filled with my solution
|
# Make a backup of sshd_config
|
||||||
|
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.bak
|
||||||
|
|
||||||
|
# Edit SSH configuration
|
||||||
|
sudo vi /etc/ssh/sshd_config
|
||||||
```
|
```
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
Add or modify these lines:
|
||||||
|
```
|
||||||
|
PermitRootLogin no
|
||||||
|
PasswordAuthentication no
|
||||||
|
PubkeyAuthentication yes
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Restart SSH service
|
||||||
|
sudo systemctl restart sshd
|
||||||
|
```
|
||||||
|
This secures SSH by disabling root login and password authentication, requiring key-based authentication.
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
```bash
|
```bash
|
||||||
# Verify SELinux status
|
# Verify SELinux port configuration
|
||||||
sestatus
|
sudo semanage port -l | grep http_port_t
|
||||||
|
|
||||||
# Check audit logs
|
# Verify firewall configuration
|
||||||
ausearch -m AVC -ts recent
|
sudo firewall-cmd --list-all
|
||||||
|
|
||||||
# Test functionality
|
# Verify SSH configuration
|
||||||
curl localhost/custom/path
|
sudo sshd -T | grep -E 'permitrootlogin|passwordauthentication|pubkeyauthentication'
|
||||||
|
|
||||||
|
# Test Apache on port 8080
|
||||||
|
curl localhost:8080
|
||||||
```
|
```
|
||||||
|
|
||||||
### Key Learnings
|
### Key Learnings
|
||||||
- Understanding of SELinux concepts
|
- Understanding of SELinux port contexts
|
||||||
- Security best practices
|
- Firewall configuration with firewalld
|
||||||
- Troubleshooting methodology
|
- SSH security best practices
|
||||||
|
- Verification methodology
|
||||||
|
|
||||||
## Skills Demonstrated
|
## Skills Demonstrated
|
||||||
- SELinux Management
|
- SELinux Management
|
||||||
@@ -96,37 +130,7 @@ From Practice Scenarios v2, Scenario 5:
|
|||||||
- Required Outcome: Hardened system with granular access controls and application-specific security
|
- Required Outcome: Hardened system with granular access controls and application-specific security
|
||||||
|
|
||||||
### Solution Steps
|
### Solution Steps
|
||||||
1. Configure SELinux for custom application
|
[To be filled when I complete this exercise]
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
2. Implement firewalld rich rules
|
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
3. Set up ACLs and sudo restrictions
|
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
4. Configure password policies
|
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
### Verification
|
|
||||||
```bash
|
|
||||||
# To be filled with my verification steps
|
|
||||||
```
|
|
||||||
|
|
||||||
### Key Learnings
|
|
||||||
- [To be filled after completing the exercise]
|
|
||||||
|
|
||||||
## Scenario: [v3-S5] Comprehensive Security Setup
|
## Scenario: [v3-S5] Comprehensive Security Setup
|
||||||
|
|
||||||
@@ -154,30 +158,4 @@ From Practice Scenarios v3, Scenario 5:
|
|||||||
- Required Outcome: Enterprise-grade security implementation with custom policies
|
- Required Outcome: Enterprise-grade security implementation with custom policies
|
||||||
|
|
||||||
### Solution Steps
|
### Solution Steps
|
||||||
1. Develop comprehensive SELinux strategy
|
[To be filled when I complete this exercise]
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
2. Configure advanced firewalld setup
|
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
3. Implement hardened SSH configuration
|
|
||||||
```bash
|
|
||||||
# To be filled with my solution
|
|
||||||
```
|
|
||||||
[My explanation will go here after completing the exercise]
|
|
||||||
|
|
||||||
### Verification
|
|
||||||
```bash
|
|
||||||
# To be filled with my verification steps
|
|
||||||
```
|
|
||||||
|
|
||||||
### Key Learnings
|
|
||||||
- [To be filled after completing the exercise]
|
|
||||||
|
|
||||||
[Additional scenarios will be documented here as completed]
|
|
||||||
@@ -85,8 +85,8 @@ curl localhost
|
|||||||
|
|
||||||
### Environment
|
### Environment
|
||||||
- OS Version: RHEL/Rocky Linux
|
- OS Version: RHEL/Rocky Linux
|
||||||
- Initial State:
|
- Initial State: Default installation without time sync or security configurations
|
||||||
- Required Outcome:
|
- Required Outcome: Properly configured time synchronization, firewall, SELinux, SSH, and automated updates
|
||||||
|
|
||||||
### Solution Steps
|
### Solution Steps
|
||||||
1. Configure chronyd to sync with time server 'time.example.com'
|
1. Configure chronyd to sync with time server 'time.example.com'
|
||||||
@@ -103,8 +103,6 @@ curl localhost
|
|||||||
# Save and exit
|
# Save and exit
|
||||||
:wq
|
:wq
|
||||||
|
|
||||||
The output should show the chrony service enabled and running
|
|
||||||
|
|
||||||
# Enable and start service
|
# Enable and start service
|
||||||
sudo systemctl enable chronyd
|
sudo systemctl enable chronyd
|
||||||
sudo systemctl start chronyd
|
sudo systemctl start chronyd
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ This section documents my solutions to storage management scenarios, including p
|
|||||||
## Scenario: [v1-S2] LVM Configuration and Management
|
## Scenario: [v1-S2] LVM Configuration and Management
|
||||||
|
|
||||||
### Original Problem
|
### Original Problem
|
||||||
[To be filled with actual scenario]
|
Create a new 2GB partition and configure it with LVM.
|
||||||
|
|
||||||
### Environment
|
### Environment
|
||||||
- OS Version: RHEL/Rocky Linux
|
- OS Version: RHEL/Rocky Linux
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ This section contains my solutions to various user management scenarios from the
|
|||||||
| [v2-S1] | System Access and File Management - Practice Scenarios v2 |
|
| [v2-S1] | System Access and File Management - Practice Scenarios v2 |
|
||||||
| [v3-S1] | Advanced User Management - Practice Scenarios v3 |
|
| [v3-S1] | Advanced User Management - Practice Scenarios v3 |
|
||||||
|
|
||||||
## Scenario: [v1-S1] Creating Users with Specific Requirements
|
## Scenario: Creating Users with Specific Requirements
|
||||||
|
|
||||||
### Original Problem
|
### Original Problem
|
||||||
From Practice Scenarios v1: Create a user named 'john' with a custom shell and home directory.
|
From Practice Scenarios v1: Create a user named 'john' with a custom shell and home directory.
|
||||||
@@ -54,7 +54,7 @@ From Practice Scenarios v1: Create a user named 'john' with a custom shell and h
|
|||||||
***
|
***
|
||||||
***
|
***
|
||||||
|
|
||||||
## Scenario: [v1-S1] Creating Users with Specific Requirements (Expanded)
|
## Scenario: Creating Users with Specific Requirements-1
|
||||||
|
|
||||||
### Original Problem
|
### Original Problem
|
||||||
- Create a new user called 'analyst1' with home directory '/home/analyst1'
|
- Create a new user called 'analyst1' with home directory '/home/analyst1'
|
||||||
@@ -109,7 +109,20 @@ From Practice Scenarios v1: Create a user named 'john' with a custom shell and h
|
|||||||
This sets the password expiry for 'analyst1' to 90 days
|
This sets the password expiry for 'analyst1' to 90 days
|
||||||
|
|
||||||
### Verification
|
### Verification
|
||||||
Commands used to verify the solution works correctly
|
Commands used to verify the solution works correctly:
|
||||||
|
```bash
|
||||||
|
# Verify user creation
|
||||||
|
id analyst1
|
||||||
|
|
||||||
|
# Verify group membership
|
||||||
|
groups analyst1
|
||||||
|
|
||||||
|
# Verify directory permissions
|
||||||
|
ls -la /data/reports
|
||||||
|
|
||||||
|
# Verify password expiry
|
||||||
|
sudo chage -l analyst1
|
||||||
|
```
|
||||||
|
|
||||||
### Key Learnings
|
### Key Learnings
|
||||||
- Understanding of useradd, groupadd, usermod, mkdir, chown, chmod, chage commands
|
- Understanding of useradd, groupadd, usermod, mkdir, chown, chmod, chage commands
|
||||||
|
|||||||
Reference in New Issue
Block a user