IT Problems & Solutions

Step-by-step fixes for the most common IT problems. Real commands, real solutions — no fluff.

200+ Problems Solved
9 Topic Areas
500+ Commands & Examples

No problems found for ""

🌐

Networking Problems

28 problems
HighCannot connect to the internet — all pings fail
Problem
No internet access. ping 8.8.8.8 times out. Browser shows "No internet connection".
Diagnosis
ip addr show # check if interface has IP ip route show # check default gateway ping 192.168.1.1 # ping gateway ping 8.8.8.8 # test external cat /etc/resolv.conf # check DNS servers
Solution
  1. Restart interface: sudo ip link set eth0 down && sudo ip link set eth0 up
  2. Request new IP: sudo dhclient -r && sudo dhclient eth0
  3. Fix DNS: echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf
  4. Add default route: sudo ip route add default via 192.168.1.1
  5. Restart networking: sudo systemctl restart NetworkManager
networkingdhcpdns
HighDNS resolution failing — domain not found
Problem
Sites fail with "server not found" but IPs work. nslookup google.com returns SERVFAIL.
Diagnosis
nslookup google.com nslookup google.com 8.8.8.8 cat /etc/resolv.conf systemd-resolve --status
Solution
  1. Set reliable DNS: add nameserver 8.8.8.8 and nameserver 1.1.1.1 to /etc/resolv.conf
  2. Flush cache: sudo systemd-resolve --flush-caches
  3. Windows: ipconfig /flushdns
  4. Restart resolver: sudo systemctl restart systemd-resolved
dnsresolv.conf
MediumHigh network latency and packet loss
Diagnosis
ping -c 50 8.8.8.8 mtr --report 8.8.8.8 iperf3 -c iperf.he.net nethogs
Solution
  1. Find bandwidth hogs: sudo nethogs eth0
  2. Check duplex: ethtool eth0
  3. Switch Wi-Fi to 5GHz band
  4. If VPS: may be noisy neighbor — contact provider
latencypacket-lossmtr
MediumSSH connection refused on port 22
Diagnosis
nc -zv host 22 systemctl status sshd ss -tlnp | grep 22 ufw status
Solution
  1. Start SSH: sudo systemctl start sshd && sudo systemctl enable sshd
  2. Open firewall: sudo ufw allow 22/tcp
  3. If port changed: ssh -p 2222 user@host
sshfirewall
MediumSSL certificate error in browser
Problem
"Your connection is not private" / NET::ERR_CERT_AUTHORITY_INVALID or expired certificate.
Diagnosis
openssl s_client -connect domain.com:443 2>/dev/null | openssl x509 -noout -dates
Solution
  1. Renew cert: sudo certbot renew --force-renewal
  2. Auto-renew cron: 0 12 * * * certbot renew --quiet
  3. Check system clock: timedatectl status — wrong date breaks SSL
sslcertbothttps
HighPort 80/443 not accessible from outside
Diagnosis
ss -tlnp | grep -E "80|443" sudo ufw status curl -I http://localhost
Solution
  1. Open firewall: sudo ufw allow 80/tcp && sudo ufw allow 443/tcp
  2. Ensure server binds to 0.0.0.0 not 127.0.0.1
  3. Cloud: add inbound rules in security group
  4. Restart web server: sudo systemctl restart nginx
nginxfirewallufw
LowVPN connected but no internet access
Solution
  1. Check routing: ip route show — look for 0.0.0.0/0 via VPN
  2. Enable split tunneling in VPN client
  3. Set DNS to 8.8.8.8 while VPN is on
  4. OpenVPN: remove redirect-gateway def1 from config
vpnrouting
MediumNetwork interface not showing IP address
Solution
  1. List interfaces: ip link show
  2. Bring up interface: sudo ip link set eth0 up
  3. Request DHCP: sudo dhclient eth0
  4. Set static IP: sudo ip addr add 192.168.1.100/24 dev eth0
dhcpip-addressinterface
🔒

Security Problems

30 problems
HighServer getting brute-forced via SSH
Diagnosis
sudo grep "Failed password" /var/log/auth.log | tail -20 sudo grep "Failed password" /var/log/auth.log | awk '{print $11}' | sort | uniq -c | sort -rn | head
Solution
  1. Install fail2ban: sudo apt install fail2ban && sudo systemctl enable fail2ban
  2. Disable password auth: set PasswordAuthentication no in /etc/ssh/sshd_config
  3. Change SSH port: Port 2222 in sshd_config
  4. Allowlist your IP: sudo ufw allow from YOUR_IP to any port 22
  5. Reload: sudo systemctl reload sshd
sshbrute-forcefail2ban
HighWebsite defaced or injected with malware
Diagnosis
find /var/www -name "*.php" -newer /var/www/index.php -ls grep -r "eval(base64_decode" /var/www/
Solution
  1. Take site offline immediately
  2. Restore from last known clean backup
  3. Change ALL passwords: FTP, DB, CMS admin, hosting panel
  4. Update CMS and plugins to patch entry point
  5. Add Cloudflare WAF — free plan blocks most attacks
malwaredefacementrecovery
HighRansomware encrypted files on server
Solution
  1. Isolate server immediately — disconnect from network
  2. Do NOT pay the ransom
  3. Check nomoreransom.org for free decryptors
  4. Restore from offline backup
  5. Report to your national cybercrime unit
  6. After restore: patch entry vector, enable EDR, set up immutable backups
ransomwareincident-responsebackup
MediumAPI keys accidentally pushed to GitHub
Solution
  1. Revoke the exposed key IMMEDIATELY
  2. Remove from history: git filter-repo --path secrets.env --invert-paths
  3. Force push: git push origin --force --all
  4. Add to .gitignore: echo ".env" >> .gitignore
  5. Use environment variables or secrets manager going forward
api-keysgitsecrets
MediumMissing security headers — F grade on securityheaders.com
Solution — Add to Nginx config
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always; add_header X-Content-Type-Options "nosniff" always; add_header X-Frame-Options "SAMEORIGIN" always; add_header X-XSS-Protection "1; mode=block" always; add_header Referrer-Policy "strict-origin-when-cross-origin" always;
security-headersnginxhsts
HighSQL Injection vulnerability in web app
Problem
User input goes directly into SQL queries. Attacker can dump database, bypass auth, or delete data.
Vulnerable code
query = "SELECT * FROM users WHERE id = " + user_input # NEVER DO THIS
Solution
  1. Use parameterized queries: cursor.execute("SELECT * FROM users WHERE id = %s", (user_input,))
  2. Use an ORM (SQLAlchemy, Django ORM) — handles escaping automatically
  3. Validate and whitelist input types — if expecting integer, cast to int first
  4. Add WAF to catch exploitation attempts
sql-injectionowaspweb-security
🐧

Linux Problems

28 problems
HighDisk 100% full — server unresponsive
Find the culprit
df -h du -sh /* 2>/dev/null | sort -rh | head -10 du -sh /var/log/* | sort -rh | head -10 find / -name "*.log" -size +100M 2>/dev/null
Solution
  1. Clear old logs: sudo journalctl --vacuum-size=100M
  2. Remove old kernels: sudo apt autoremove --purge
  3. Clean apt cache: sudo apt clean
  4. Delete large temp files: sudo find /tmp -size +50M -delete
  5. Truncate log: sudo truncate -s 0 /var/log/syslog
disk-fulllogsstorage
HighCPU at 100% — server crawling
Diagnosis
top ps aux --sort=-%cpu | head -10 htop
Solution
  1. Kill runaway process: kill -9 PID
  2. Lower priority: renice +10 PID
  3. Check for crypto miners: ps aux | grep -i "xmrig\|minerd"
  4. Limit CPU in systemd service: add CPUQuota=50%
cpuperformanceprocess
HighPermission denied errors on files
Diagnosis
ls -la /path/to/file whoami id stat /path/to/file
Solution
  1. Make executable: chmod +x script.sh
  2. Change ownership: sudo chown user:group /path
  3. Web dir perms: sudo chown -R www-data:www-data /var/www
  4. Add to group: sudo usermod -aG groupname username
permissionschmodchown
MediumService fails to start after reboot
Diagnosis
systemctl status servicename journalctl -u servicename -n 50
Solution
  1. Enable auto-start: sudo systemctl enable servicename
  2. Fix config errors shown in journal
  3. Check for port conflicts: ss -tlnp | grep PORT
  4. Reload daemon: sudo systemctl daemon-reload
systemdserviceboot
MediumOut of memory — OOM killer killing processes
Diagnosis
free -h dmesg | grep -i "oom\|killed" ps aux --sort=-%mem | head -10
Solution
  1. Add swap: sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile
  2. Make permanent: add /swapfile none swap sw 0 0 to /etc/fstab
  3. Tune: sudo sysctl vm.swappiness=10
memoryoomswap
Mediumcron job not running as expected
Diagnosis
grep CRON /var/log/syslog | tail -20 crontab -l systemctl status cron
Solution
  1. Test cron syntax at crontab.guru
  2. Cron uses minimal PATH — use full paths: /usr/bin/python3 not python3
  3. Redirect output to log: * * * * * /script.sh >> /var/log/myjob.log 2>&1
  4. Check cron is running: sudo systemctl start cron
cronschedulinglinux
☁️

Cloud Problems

24 problems
HighAWS bill unexpectedly high — cost spike
Common culprits
NAT Gateway transfer, forgotten EC2 instances, S3 request spikes, unattached Elastic IPs
Solution
  1. Identify spike: AWS Console → Cost Explorer → by service
  2. Set billing alarm in CloudWatch
  3. Enable AWS Budgets — email alert before threshold hit
  4. Use Reserved Instances for predictable workloads (saves 40-70%)
  5. Use AWS Trusted Advisor to find idle resources
awscostbilling
HighLocked out of EC2 after security group change
Solution
  1. AWS Console → EC2 → Security Groups → Edit Inbound Rules
  2. Add SSH rule: Port 22, Source: My IP
  3. For future: use AWS Systems Manager Session Manager (no port 22 needed)
ec2security-grouplockout
HighS3 bucket accidentally made public
Solution
  1. Block immediately: S3 → Bucket → Permissions → Block all public access → Enable
  2. Via CLI: aws s3api put-public-access-block --bucket BUCKET --public-access-block-configuration "BlockPublicAcls=true,BlockPublicPolicy=true,IgnorePublicAcls=true,RestrictPublicBuckets=true"
  3. Enable S3 Block Public Access at account level
s3data-exposureaws
MediumKubernetes pod stuck in CrashLoopBackOff
Diagnosis
kubectl get pods kubectl describe pod POD_NAME kubectl logs POD_NAME --previous
Solution
  1. Read crash logs — root cause is almost always in there
  2. Common causes: missing env vars, wrong image, misconfigured liveness probe
  3. Exit code 137 = OOMKilled — increase memory limit
  4. Restart deployment: kubectl rollout restart deployment/NAME
kubernetesk8scrashloop
⚙️

DevOps Problems

24 problems
HighDocker container exits immediately after start
Diagnosis
docker ps -a docker logs CONTAINER_ID docker run -it IMAGE /bin/sh
Solution
  1. Exit code 1 = app error — check logs
  2. Exit code 137 = OOM killed — increase --memory limit
  3. Add CMD to Dockerfile: CMD ["python", "app.py"]
  4. Pass env vars: --env-file .env
dockercontainer
HighCI/CD pipeline failing on every push
Solution
  1. Read the full CI log — don't just see "failed", find WHY
  2. Missing secrets: add to GitHub Settings → Secrets and variables
  3. Pin runtime version in workflow: node-version: '20'
  4. Reproduce locally with act tool
ci-cdgithub-actionspipeline
MediumNginx 502 Bad Gateway
Diagnosis
sudo tail -f /var/log/nginx/error.log systemctl status gunicorn curl http://localhost:8000
Solution
  1. 502 = nginx can't reach backend — start the backend service
  2. Check proxy_pass port matches where backend actually runs
  3. Increase timeout: proxy_read_timeout 300;
  4. Reload: sudo nginx -t && sudo systemctl reload nginx
nginx502proxy
MediumGit push rejected — non-fast-forward
Solution
  1. Pull and rebase: git pull --rebase origin main
  2. Resolve any conflicts, then push again
  3. Never force push to shared branches without team consent
gitpushrebase
🗄️

Database Problems

24 problems
HighMySQL queries extremely slow — full table scans
Diagnosis
EXPLAIN SELECT * FROM users WHERE email = '[email protected]'; -- Look for type: ALL = full table scan SHOW FULL PROCESSLIST;
Solution
  1. Add index: CREATE INDEX idx_email ON users(email);
  2. Enable slow query log: SET GLOBAL slow_query_log = 1;
  3. Composite index for multi-column WHERE: CREATE INDEX idx ON table(col1, col2);
  4. Update stats: ANALYZE TABLE users;
mysqlindexslow-query
HighAccidentally deleted data — no backup
Solution
  1. Stop writes immediately
  2. MySQL binary log recovery: mysqlbinlog --start-datetime="2026-07-03 08:00:00" /var/lib/mysql/mysql-bin.000001 | mysql -u root -p
  3. PostgreSQL: use Point-in-Time Recovery if WAL archiving was on
  4. Check replica — promote before it syncs the delete
  5. Lesson: always test backups, always use transactions
data-recoverybackupbinlog
HighToo many connections — connection pool exhausted
Diagnosis
SHOW STATUS LIKE 'Threads_connected'; SHOW VARIABLES LIKE 'max_connections'; SHOW FULL PROCESSLIST;
Solution
  1. Increase limit: SET GLOBAL max_connections = 500;
  2. Add connection pooling: PgBouncer (PostgreSQL) or ProxySQL (MySQL)
  3. Find connection leaks — ensure app closes connections after use
  4. Set idle timeout: SET GLOBAL wait_timeout = 60;
mysqlconnectionspool
MediumDeadlock errors in database logs
Diagnosis
SHOW ENGINE INNODB STATUS\G -- Look for LATEST DETECTED DEADLOCK section
Solution
  1. Always access tables in the same order across transactions
  2. Keep transactions short — don't hold locks during non-DB work
  3. Lower isolation: READ COMMITTED vs REPEATABLE READ
  4. Add retry logic in app for error code 1213
deadlocktransactionsinnodb
🖥️

Hardware Problems

22 problems
HighServer overheating — thermal throttling
Diagnosis
sensors dmesg | grep -i "thermal\|throttl"
Solution
  1. Clean dust from fans — compressed air every 6-12 months
  2. Replace thermal paste on CPU — degrades after 3-5 years
  3. Ensure proper airflow — hot exhaust not recirculating as intake
  4. Check fan speeds via sensors — 0 RPM = fan failed
thermalcpucooling
HighHard drive failing — S.M.A.R.T. errors
Diagnosis
sudo smartctl -a /dev/sda sudo smartctl -H /dev/sda dmesg | grep -i "error\|I/O"
Solution
  1. SMART shows FAILED = backup ALL data NOW, drive will die soon
  2. Watch reallocated_sector_ct — any non-zero = serious
  3. Set up monitoring: sudo apt install smartmontools && sudo systemctl enable smartd
  4. Replace drive before failure — RAID is not a backup
smartdiskfailure
MediumRAM causing random crashes — memtest errors
Diagnosis
sudo apt install memtester sudo memtester 1G 1 # Or: boot memtest86+ from USB
Solution
  1. Any memtest errors = faulty RAM
  2. Remove sticks one at a time to isolate bad one
  3. Reseat RAM firmly in slot
  4. Try different slots — could be motherboard fault
rammemtestcrash
📋

Compliance Problems

20 problems
HighGDPR violation — user data without consent
Solution
  1. Add cookie consent banner before loading any tracking scripts
  2. Publish Privacy Policy and Cookie Policy pages
  3. Implement consent management: Cookiebot, OneTrust, or open-source Klaro
  4. Document legal basis for all data processing
  5. Add "Delete My Data" option for right to erasure
gdprprivacyconsent
HighPCI DSS — storing plain-text card data
Solution
  1. Delete all stored card data immediately
  2. Use a payment processor — Stripe, Braintree — never touch raw card data
  3. Tokenize: processor returns token you charge later
  4. Never store CVV under any circumstances — prohibited by PCI DSS
pci-dsspaymentscompliance
MediumAudit log gaps — missing activity records
Solution
  1. Enable DB audit logging: MySQL audit plugin or PostgreSQL pgaudit
  2. Log all admin actions: who, what, when, from which IP
  3. Ship logs to immutable storage — attacker can't delete what they can't reach
  4. Retention: SOC 2 = 1 year minimum, PCI DSS = 1 year minimum
audit-logssoc2compliance