All Flashcards
(80 cards)
[Network]
What is a wildcard certificate?
a type of SSL/TLS certificate (using a ‘*’) that secures a domain and all of its subdomains with a single certificate.
[Linux]
What commands do you use to change file permissions & ownership?
chmod (for permissions)
& chown (for ownership)
[Ansible]
What flag limits the (ansible) playbook?
-l
[Ansible]
How to run a YAML file on all host in stage inventory?
-l [specify inventory file]
[Ansible]
Whats the name of the term/condition that only allows you to do things when certain conditions are met?
When
[Linux]
How would you start a service in RHEL?
Systemctl start [service name]
[Linux]
How would you install a package?
yum install [package name]
[Ansible]
What is ansible?
& how do you use it?
It is a configuration management tool, that allows us to automate repetitive tasks & ensure consistency across servers.
[Ansible]
[Get clarity on the best way to answer this]
What’s the difference between an ansible playbook, role, and task?
playbook= a YAML file containing plays (a set of tasks) that define the automation steps
role= a structured way to organize playbooks into smaller, reusable & more manageable units (contains task, variables, templates, file and handlers)
task= a single action that can executed on a remote system (example: installing a package or starting a service)
[Ansible]
What flag runs the playbook but doesn’t apply it?
–check
[Ansible]
What flag limits the playbook to a specific host?
-l
[Ansible]
How to run a playbook on all host in stage inventory?
-l [specify host]
[Ansible]
What are the benefits of Ansible’s item potency?
Ansible checks the deltas & will only change things that need to be changed so that you can run it multiple times on the same system.
[Ansible] [Get clarity]
If installing a package & writing a task what Ansible module would you use?
YUM (RHEL7)
or
DNF (RHEL8)
[Ansible] [Need clarity]
What is the general design of a playbook?
Starts with — to indicate a YAML document.
- name: (of play)
host: (target machines or group [from inventory file])
become: (need to run play as root?)vars: (defines reusable names/values)
package_name: (ie: httpd)tasks:
- name: (name of task)
Defines reusable values.
Example:
yaml
Copy
Edit
vars:
package_name: httpd
Tasks (tasks)
The core of the playbook, executing actions using Ansible modules.
Example:
yaml
Copy
Edit
- name: Install Apache
yum:
name: httpd
state: present
Handlers (handlers)
Triggered by tasks (e.g., restart a service after configuration changes).
Example:
yaml
Copy
Edit
handlers:
- name: Restart Apache
systemd:
name: httpd
state: restarted
Roles (roles)
Organizes tasks, variables, templates, and handlers into reusable components.
Conditional Execution (when)
Runs tasks only if conditions are met.
[Ansible]
How does Ansible leverage Jinga2?
for template processing and enables the dynamic insertion of data into files based on variables and logic defined in your playbooks.
[Linux?]
What is SMTP & post-fix?
smtp = (Simple Mail Transfer Protocol) is a set of rules for sending and receiving emails over the internet using TCP & default port 25 or 587 (TLS encrypted)
Post fix = mail server package that linux uses
[Linux]
Where are system log files typically stored for RHEL?
/var/log/messages = general system messages
+journalctl -k (for kernel logs)
/var/log/secure = authentication logs
/var/log/httpd = Apache web server logs (access & error logs)
/var/log/cron = logs of scheduled CRON jobs
[Linux]
What are IP tables?
a tool used to configure & manage packet filtering + network traffic rules.
[AWS]
What is a load balancer? What is it generally used for?
a system/device that manages incoming traffic to multiple servers to ensure performance, reliability & availability. Helps avoid overload on any 1 server.
[Linux]
What command is used patch manually?
$ yum update
[Linux]
What do you use /var/log or /var/log/messages for?
to check system logs
& messages regarding security events, user activities, application logs & kernel messages
ex: use ‘grep’ (search/find), ‘tail’ (last commands used), & ‘less’
[Linux]
What are some big differences between RHEL7 & RHEL8?
1) Package management:
RHEL7 uses YUM
vs
RHEL8 uses DNF (faster & more efficient)
2) Kernal Upgrade:
RHEL7 uses 3.10
vs
RHEL8 uses 4.18 (better hardware support, performance & security)
3) Software Packaging
RHEL7 uses traditional RPM packaging
vs
RHEL8 introduces Application Streams, allowing multiple versions of software to be installed and maintained simultaneously
4) Networking
RHEL7 uses iptables for firewall management
vs
RHEL8 replaces ‘iptables’ with ‘nftables’ (simplifies network filtering) + ‘network-scripts’ is now ‘NetworkManager’
5) Security Enhancements
RHEL8 improves encryption & security compliance (with OpenSSL 1.1.1 + TLS 1.3), system-wide cryptographic policies, & rootless containers (reducing the need for root privileges)
6) Desktop Environment
RHEL7 uses GNOME 3.22 with X.org
vs
RHEL8 uses GNOME 3.28 with Wayland (X.org still available)
7) Storage & Filesystem Changes
RHEL7 supports XFS, ext4 and Brtrf
vs
RHEL8 drops Btrf, (keeps XFS & ext4) + adds Stratis (easier storage management)
8) Containerization changes
RHEL7 uses Docker
vs
RHEL8 drops Docker and uses Podman, Buildah & Skopeo (more secure & rootless containers)
[Troubleshoot]
Steps when dealing with BRUTE FORCE ATTACKS
1) Identify the attack (monitor sys logs (/var/log/auth.log and/or /var/log/secure) use ‘lastb’ to see failed login attempts
2) Block the attacker (using Fail2Ban (for SSH, webservers, etc) or manually by editing ‘iptables’ or ‘firewalld’)
3) Enforce Strong Authentication (disable password authentication in /etc/ssh/sshd_config and use SSH keys instead) and/or enable multi-factor authentication
4) Limit Login Attemps (edit /etc/ssh/sshd_config > MaxAuthTries)
5) Change Default Port (change from port 22 to a no-standard port (ie 2222) in /etc/ssh/sshd_config)
6) Monitor and Audit regularly
-use Intrusion Detections System (IDS) like OSSEC or AIDE
-Regularly check /var/log/auth.log or use journalctl -xe
-automate alerts using Fail2Ban w/ email notifications
7) Use Web Application Firewalls (WAFs)
-use ModSecurity or cloud-based WAFs like Cloudflare or AWS WAF
8) Keep System Updated (via constant patching)