All Flashcards

1
Q

[Network]
What is a wildcard certificate?

A

a type of SSL/TLS certificate (using a ‘*’) that secures a domain and all of its subdomains with a single certificate.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

[Linux]
What commands do you use to change file permissions & ownership?

A

chmod (for permissions)
& chown (for ownership)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

[Ansible]
What flag limits the (ansible) playbook?

A

-l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

[Ansible]
How to run a YAML file on all host in stage inventory?

A

-l [specify inventory file]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

[Ansible]
Whats the name of the term/condition that only allows you to do things when certain conditions are met?

A

When

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

[Linux]
How would you start a service in RHEL?

A

Systemctl start [service name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

[Linux]
How would you install a package?

A

yum install [package name]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

[Ansible]
What is ansible?
& how do you use it?

A

It is a configuration management tool, that allows us to automate repetitive tasks & ensure consistency across servers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

[Ansible]
[Get clarity on the best way to answer this]
What’s the difference between an ansible playbook, role, and task?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

[Ansible]
What flag runs the playbook but doesn’t apply it?

A

–check

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

[Ansible]
What flag limits the playbook to a specific host?

A

-l

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

[Ansible]
How to run a playbook on all host in stage inventory?

A

-l [specify host]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

[Ansible]
What are the benefits of Ansible’s item potency?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

[Ansible] [Get clarity]
If installing a package & writing a task what Ansible module would you use?

A

YUM (RHEL7)
or
DNF (RHEL8)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

[Ansible] [Need clarity]
What is the general design of a playbook?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

[Ansible]
How does Ansible leverage Jinga2?

A

for template processing and enables the dynamic insertion of data into files based on variables and logic defined in your playbooks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

[Linux?]
What is SMTP & post-fix?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

[Linux]
Where are system log files typically stored for RHEL?

A

/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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

[Linux]
What are IP tables?

A

a tool used to configure & manage packet filtering + network traffic rules.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

[AWS]
What is a load balancer? What is it generally used for?

A

a system/device that manages incoming traffic to multiple servers to ensure performance, reliability & availability. Helps avoid overload on any 1 server.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

[Linux]
What command is used patch manually?

A

$ yum update

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

[Linux]
What do you use /var/log or /var/log/messages for?

A

to check system logs
& messages regarding security events, user activities, application logs & kernel messages

ex: use ‘grep’ (search/find), ‘tail’ (last commands used), & ‘less’

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

[Linux]
What are some big differences between RHEL7 & RHEL8?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

[Troubleshoot]
Steps when dealing with BRUTE FORCE ATTACKS

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
Q

[Interview] What is your experience with GitLab & BitBucket? (enterprise versions of GitHub)

A

We use it for version control for CI/CD
(version control: a system that helps manage changes to files, code or documents over time. Also allows you to go back to a previous version of a file, see history of changes or collaborate with others w/o overwriting each others work)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
26
Q

[Troubleshoot]
I used Ansible to patch multiple systems but one system could not update the patch. Troubleshoot, why?

A

I would run the playbook with ‘-vvv’ to identify specific errors.
If the issue is package-related, I would manually check the package manager, ensure disk space is sufficient, and confirm that the repository is accessible.

I would also verify that the playbook logic, conditions, and inventory settings don’t exclude the host.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
27
Q

[Linux]
How do you do rollbacks in RHEL/CentOs?

A

**From the snapshot

Using package manager:
$ dnf history undo [transaction_id]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
28
Q

[Interview]
What’s your STIG score?

A

It’s difficult to say because it’s impossible to have a 100% STIG score. We must have some vulnerabilities for some services to run.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
29
Q

[Linux]
What are the three components of the Linux OS?

A

Kernel (core)
Shell (CLI/User Interface)
File System (how data is stored, organized & accessed)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
30
Q

[Linux]
What is the difference between UNIX and Linux?

A

Unix: commercial (expensive), primarily used in enterprise environments

Linux: Open source, flexible, widely used (personal to enterprise)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
31
Q

[Linux]
What is bash?

A

Command-line shell (execute commands directly) & scripting language (for automating task)

ie: ls, cd, grep

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
32
Q

[Linux]
What is a CronTab?

A

Config file used to schedule and automate task

(left to right: minute, hour, day, month, day-of-the-week)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
33
Q

[Linux]
What do you use the root account for?

A

unrestricted privileges & only critical system admin task.
It is best practice to use ‘sudo’ instead of direct root access

34
Q

[Troubleshoot]
What would you do if you received an error message that the file system is full?

A

Check disk usage: $ df -h
Identify large files: $ du -sh /*
Delete or compress unnecessary files: $ rm, journalctl –vacuum-time=7d
Check deleted files still using space: $ lsof | grep deleted
Extend filesystem if necessary: $ lvextend, resizefs

35
Q

[Linux]
Where is the password file located in linux?

A

/etc/passwd
OR
(encrypted) /etc/shadow

36
Q

[Linux]
What is chmod [file/folder]?

A

Change permissions of [file]
$ chmod [u/g/o + r/w/x] [files/dir]

37
Q

[Linux]
What is a ext3 file system?

A

3rd extended file system; slowly being phased out by ext4.

major upgrade over ext2 was JOURNALING, which improved reliability (data integrity) & prevented data corruption during power loss or system crash (fast recovery)
-easily convert ext2 to ext3
-not as scalable as ext4 or XFS
-doesnt handle large files/volumes as well as ext4

38
Q

[Interview]
What tools would you use for monitoring?

A

$ htop = CPU, memory, swap usage, running processes
$ vmstat 1 = detailed info about sys performance including virtual memory, processes, CPU activity & disk I/O (updated every second)
$ free -h = display memory usage (RAM & swap: total, used, free, shared, cached)

$ df -h = disk space usage for mounted filesystems
$ du -sh [file/dir] = disk usage of [file/dir]

$ “netstat / ss” -tuln = active network connections, listening ports, network stats

39
Q

[Interview]
How do you manage disk storage and clean up disk space?

A

$ df -h = show free disk space on all mounted filesystems
$ du -sh [file/dir] = shows disk usage of [file/dir]

$ yum clean all = cleans package manager cache
$ yum clean packages = removes package cache

$ logrotate = Rotate (& compress) old logs (located in /etc/logrotate.conf)

$ rm /tmp/* = Delete temp files

need yum-utils:
$ package-cleanup –leaves = removes orphaned packages

40
Q

[Network]
What command would you use to show listening ports?

A

$ ss -tuln
OR
$ netstat -tuln

41
Q

How is TomCat implemented?
Is it from source or RPM?

A

[need to fact check]
I would do it from source, I would unload the package and then specify my Catalina home

42
Q

[Network]
TCP vs UDP

A

TCP is a 3 way handshake (ie Rsync)(for task that confirmation)
UDP is a 2 way handshake (ie netstat)(faster, used for streaming/gaming)

43
Q

[DNS Records]
What is an ‘A record’?

A

Maps a domain name to an IPv4 address

44
Q

[DNS Records]
What is a ‘CName record’?

A

Creates an alias domain that points to another domain

45
Q

[DNS Records]
What is a ‘PTR record’?

A

Used for reverse DNS lookups; mapping an IP address to a domain.

46
Q

[DNS Records]
What is a AAAA (quad-A) record?

A

Maps a domain name to an IPv6 address

47
Q

[Interview]
What is a LAMP environment?

A

a popular open-source software stack used for hosting web applications utilizing Linux, Apache, MySQL & PHP/Python.

48
Q

[Ansible]
Typically, where is the main playbook stored?

49
Q

[Ansible]
Where are the variables for /etc/chrony.conf stored?

A

in main.yaml

50
Q

[Ansible]
Where are the templates stored?

A

in /etc/chrony.conf

51
Q

[Ansible]
What file controls all the configurations?

A

/main.yaml

52
Q

[Ansible]
What flag gives an in-depth breakdown of the play/processes being ran?

A

-v OR -vvv (verbose)

53
Q

[Linux]
Difference between Linux and Unix

A

UNIX is proprietary & commercial while Linux is free & open source

54
Q

[Linux]
What are the different files types in Linux?

A

files
directories
special files (represent devices ie /dev/sda)
Symbolic links (point to other files)
FIFO files [aka pipes] used for inter-process communication)

55
Q

[Linux]
How do you check CPU usage?

A

$ top or $ htop

56
Q

[Linux]
What are the different run levels in Linux?

A

0 = HALT (shuts down the system)
1 = Single-user mode (for maintenance)
2 = Multi-user mode w/o networking
3 = Multi-user mode WITH networking
4 = unused/customizable
5 = Multi-user w/ GUI
6 = REBOOT

57
Q

[Linux]
What command to check current runlevel?

A

$ runlevel

58
Q

[Linux]
What command to change runlevel?

A

$ init [number] = switch to runlevel [number]

59
Q

[Network]
What command to check what ports are open?

A

$ netstat -tulnp
$ ss -tulnp

60
Q

[Linux]
How to create, delete and assign password for users in Linux?

A

$ useradd [username]
$ userdel [username]
$ passwd [username]

61
Q

[Linux]
What is an inode?

A

An inode (Index Node) is a data structure used by file systems in Linux to store metadata about a file or directory.
(harddrive identifier)

It contains information such as:
File type, Permissions, Ownership, Size of the file, Timestamps

62
Q

[Network]
What port does Apache run on?
Does it use TCP or UCP?

A

http= port 80 / https= port 443
typically uses TCP

63
Q

[Network]
What port does DNS run on?
Does it use TCP or UCP?

A

port 53
Both TCP & UCP

64
Q

[Network]
What port does NFS run on?
Does it use TCP or UCP?

A

port 2049
Both TCP & UCP

65
Q

[Network]
What port does SSH run on?
Does it use TCP or UCP?

66
Q

[Network]
Where is the config file for SSH?

A

/etc/ssh/sshd_config

67
Q

[Linux]
explain hardlink vs softlink

A

A hard link is a direct reference to the data vs a softlink is a shortcut/reference to another file or directory.

68
Q

[Linux]
How do you check disk usage?

69
Q

[Linux]
How do you check memory usage?

70
Q

[Linux]
How do you check network usage?

A

$ iftop or $ netstat -tulnp

71
Q

[Linux]
How do you check Disk I/O usage?

72
Q

[Linux]
What is SELinux? & its purpose?

A

a module that increases security by limiting process actions

extra features: Type Enforcement (TE), Role-Based Access Control (RBAC), Multi-Level Security (MLS)

73
Q

[Linux]
What is fstab?

A

(File System Table): contains information about disk partitioning & storage devices that should be automatically mounted at boot
-located in /etc/fstab

74
Q

[Linux]
What are the modes of SELinux?
& how to check current mode

A

Enforcing, Permissive, & Disabled.
Check by using: $ sestatus

75
Q

[Linux]
How to change modes in SELinux, temporarily & permanently

A

Temp: $ setenforce 1 or 0 [1=enforcing, 0=permissive]

Perm: goto /etc/selinux/config change “SELINUX=____” to enforcing, permissive or disabled, then save & reboot.

76
Q

[Ansible]
Where is the Ansible config file located?

A

/etc/ansible/ansible.cfg

77
Q

[Interview]
Tell me about a time when something broke & you had to fix it

A

personalized answer

78
Q

[Interview]
What would you do if a server went down?

A

personalized answer

79
Q

[Interview]
What are some things you would check if your application went down?

A

personalized answer

80
Q

[Interview]
Someone is complaining of a server with full disk space, & when running a df -h says nothing is full. What would you do?

A

personalized answer