Welcome to InfoTech Ninja

IT professional writing about cybersecurity, cloud & DevOps, automation, networking, and systems administration. Real-world guides for real-world problems.

#Cybersecurity #Cloud #Automation #Networking #SysAdmin

Latest Articles

Linux Process Management: ps, top, kill, jobs, cron, nice

Working reference for Linux process management. ps aux vs ps -ef and the sort flags (--sort=-%mem / -%cpu), interactive viewers (top with P/M/k shortcuts, htop, btop), pstree for hierarchy, the seven signals you actually need (SIGHUP/INT/QUIT/TERM/KILL/STOP/CONT) and why SIGTERM-first-then-SIGKILL beats SIGKILL alone, killall vs pkill, foreground/background job control with & / fg / bg / disown / nohup vs the modern tmux alternative for survive-logout sessions, cron 5-field syntax with the full-paths gotcha, at for one-shots, systemd timers as the modern replacement, nice / renice / ionice for priority (counter-intuitive higher-number-equals-lower-priority). Pitfalls: SIGKILL too soon, cron silent failures, nohup doesn't imply background, parent-kill doesn't reap children.

Linux File Permissions: chmod, chown, umask, and ACLs

Working reference for Linux file permissions. The 9-bit model (user/group/other times rwx), octal shorthand (r=4 w=2 x=1, classic 755 / 644 / 600 / 700 / 777-no-please), reading the ls -l first column for file types (-, d, l, c, b, s, p), chmod numeric vs symbolic syntax, the recursive-chmod foot-gun (use find -type f vs -type d separately, or X capital), chown / chgrp ownership changes, umask defaults (022 vs 027 vs 077), the three special bits (setuid 4 / setgid 2 / sticky 1) with /tmp and /usr/bin/passwd as examples, POSIX ACLs (setfacl -m u:bob:r--) for when 9 bits arent enough. Pitfalls: chmod -R 755 on code trees, SSH 600 / 700 requirements, web-server reading uploads, setuid on scripts (ignored), and what r/w/x actually mean for directories.

Linux Text Processing: grep, awk, sed, sort, and Friends

Working reference for Linux text processing on the command line. grep with -i / -v / -r / -E / -A -B context / -c count / -l filenames-only, awk field-based ( to ) with custom -F separator and condition { action } pattern, sed s/old/new/g / -i in-place / -i.bak with backup / d for delete / p for print, sort -n / -k by column / -t separator, uniq -c -d (needs sorted input!), wc / head / tail -f / cut / tr character translations, and xargs with -0 for null-separated filenames. Real pipelines: top 10 404 IPs from nginx, active SSH users by frequency, mass sed-replace across config files. Pitfalls: grep regex vs -F fixed-string, sed -i destroys silently, tail -F (uppercase) for log rotation, xargs without -0 breaks on filenames with spaces.

Linux File & Directory Operations: ls, cd, cp, mv, rm, find

Working reference for the Linux file and directory commands you type thousands of times a year. ls with -l/-la/-lh/-ltr/-ld variations, the cd - bounce trick, mkdir -p for idempotent path creation, cp -a for archive-style copies (with the trailing-slash gotcha), mv for both rename and move, rm -rf danger and the safer find -print -> find -delete pattern, find by name/size/mtime/owner with -exec and -delete, locate vs find (locate is fast but stale), symbolic links with ln -s, the 10 commands that cover 95 percent of daily use, and the common pitfalls (rm -rf with unset variable, trailing-slash confusion, unquoted spaces in filenames).

Cisco IOS IS-IS Configuration: NET, Levels, and Backbone Routing

Working reference for IS-IS on Cisco IOS. What makes IS-IS different (runs on Layer 2 / CLNS not IP, doesn't need IP addresses to form adjacencies, carries multiple address families in one process). The NET address breakdown (AFI, area, system-id, SEL) and convention of deriving System ID from loopback. Levels: L1 intra-area, L2 backbone, L1/L2 ABR-equivalent routers, with circuit-type per-interface control. Basic configuration (net, is-type, ip router isis on interface), loopback inclusion for /32 propagation, default cost of 10 and metric-style wide for headroom, MD5 authentication. Verification (show isis neighbors / topology / database, show clns commands). IS-IS vs OSPF comparison. Pitfalls: wrong NET, circuit-type mismatch, narrow metric overflow, missing ip router isis, discontiguous L2 backbone.

Cisco IOS RIP Configuration: RIPv2, Authentication, Timers

Working reference for RIPv2 on Cisco IOS. The protocol basics (distance-vector, hop-count metric max 15, UDP 520, multicast 224.0.0.9, AD 120, 30s/180s/180s/240s timer model), why RIP is mostly retired (15-hop max, slow convergence, routing-by-rumor) and where it still fits (tiny stub networks, legacy gear). Basic configuration with the essential version 2 + no auto-summary commands, network statement (classful, no wildcard mask), passive-interface default + selective unpassive, default-information originate, MD5 authentication via key-chain, timer tuning. Loop prevention (split horizon, route poisoning, holddown), the no ip split-horizon trick on Frame Relay multipoint, RIPng per-interface enablement for IPv6. Pitfalls: forgetting version 2, no auto-summary, mismatched timers, MD5 key-id mismatch.

Cisco IOS Route Filtering: Distribution Lists, Prefix Lists, Route-Maps

Working reference for the three Cisco IOS route-filtering tools. Distribution lists with ACL or prefix-list reference for inbound/outbound filtering at the routing process boundary. Prefix lists with ge/le qualifiers for prefix-length range matching, common patterns (default route only, any prefix, host routes, /24-/28 of a /8). Route-maps with sequenced clauses, the implicit final deny and the explicit permit-anything-else fallthrough, the menu of match conditions (ip address, next-hop, route-source, interface, metric, tag, as-path, community) and set actions (next-hop, metric, local-preference, community, as-path prepend, tag, weight). Where route-maps plug in: BGP neighbors, redistribution, PBR. Route tags as the glue between protocols to prevent redistribution loops. Pitfalls: missing fallthrough, prefix-list ge/le defaults, OSPF flood-can't-be-filtered, redistribution loops without tags.

Cisco IOS Path Control: PBR, IP SLA, and Offset Lists

Working reference for Cisco IOS path-control. Policy-Based Routing (PBR) with route-maps and ACLs to override the routing table for specific traffic on inbound interfaces, locally-originated PBR via ip local policy. IP SLA active measurement with icmp-echo / tcp-connect / http probes plus the schedule command. Track objects bound to IP SLA reachability or interface line-protocol, with delay debouncing to prevent flapping. Tying a static route to a track for automatic dual-WAN failover. Offset lists to add/subtract from routing protocol metrics. The combined PBR + IP SLA + floating static pattern for resilient dual-WAN. Pitfalls: PBR applied outbound, missing fallthrough, IP SLA without schedule, track delay too short, set ip next-hop without verify-availability.