SMART PORT
BILLING
INFRASTRUCTURE
Production-grade RHEL 9 deployment for maritime port billing operations — secure, automated, and continuously available.
Infrastructure Topology
End-to-end deployment stack — from the network perimeter to persistent LVM storage, every layer hardened and automated.
Infrastructure Scripts
Seven hardened Bash scripts covering every RHCSA deployment skill — strict mode, ERR traps, idempotent execution, and full structured logging.
RHCSA Skills Matrix
Every script maps to a core RHCSA EX200 objective — from user management and LVM to SELinux contexts and systemd service units.
Hardening Deep-Dive
Three independent hardening layers — every directive deliberate, every context explicit.
SELinux Enforcing Mode
Every file, port, and process receives an explicit SELinux context. No policy shortcuts — targeted policy with custom fcontext rules.
## Applied by 03_firewall_selinux.sh
# Set SELinux to enforcing (persistent)
setenforce 1
sed -i 's/SELINUX=.*/SELINUX=enforcing/' \
/etc/selinux/config
# File contexts for billing app
semanage fcontext --add \
--type httpd_sys_content_t \
"/srv/portbill/data(/.*)?"
semanage fcontext --add \
--type httpd_log_t \
"/srv/portbill/logs(/.*)?"
# Port contexts
semanage port --add \
--type ssh_port_t \
--proto tcp 2222
semanage port --add \
--type http_port_t \
--proto tcp 3000
# Apply contexts
restorecon -Rv /srv/portbill/
# Booleans — least privilege
setsebool -P httpd_can_network_connect on
setsebool -P httpd_read_user_content off
setsebool -P httpd_enable_homedirs off
firewalld Zone Architecture
A dedicated portbilling zone replaces the default public zone, with rich rules restricting SSH to the admin subnet only.
## Applied by 03_firewall_selinux.sh
# Create dedicated billing zone
firewall-cmd --permanent \
--new-zone=portbilling
# Admin-only SSH (port 2222)
firewall-cmd --permanent \
--zone=portbilling \
--add-rich-rule="rule family='ipv4' \
source address='192.168.10.0/24' \
port port='2222' protocol='tcp' accept"
# Billing LAN → HTTPS
firewall-cmd --permanent \
--zone=portbilling \
--add-rich-rule="rule family='ipv4' \
source address='10.10.0.0/16' \
service name='https' accept"
# Rate limit public HTTP
firewall-cmd --permanent \
--zone=portbilling \
--add-rich-rule="rule family='ipv4' \
service name='http' \
limit value='100/m' accept"
# Graceful rejection of everything else
firewall-cmd --permanent \
--zone=portbilling --set-target=REJECT
firewall-cmd --reload
SSH Hardening (CIS + NIST)
Key-only authentication on port 2222, restricted to billing-admin group. Crypto limited to FIPS-compatible algorithms.
## config/sshd_config.hardened
Port 2222
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
AllowGroups billing-admin
LoginGraceTime 30
MaxAuthTries 3
MaxSessions 5
ClientAliveInterval 300
ClientAliveCountMax 2
X11Forwarding no
AllowAgentForwarding no
AllowTcpForwarding no
LogLevel VERBOSE
Banner /etc/ssh/billing-banner
# FIPS-compatible crypto
KexAlgorithms \
curve25519-sha256,\
diffie-hellman-group14-sha256
Ciphers \
chacha20-poly1305@openssh.com,\
aes256-gcm@openssh.com
MACs \
hmac-sha2-512-etm@openssh.com,\
hmac-sha2-256-etm@openssh.com
Deployment Pipeline
Run scripts in order — each builds on the last. Idempotent design means re-runs are safe at any stage.
Technologies Used
Interactive Deployment Runner
Configure and simulate running all 7 infrastructure scripts — real RHEL 9 output, live system state, fully in-browser.
or click ▶ Run Full Deployment to simulate the complete RHEL 9 infrastructure setup.