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 problemsHighCannot 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
- Restart interface:
sudo ip link set eth0 down && sudo ip link set eth0 up - Request new IP:
sudo dhclient -r && sudo dhclient eth0 - Fix DNS:
echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf - Add default route:
sudo ip route add default via 192.168.1.1 - Restart networking:
sudo systemctl restart NetworkManager
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
- Set reliable DNS: add
nameserver 8.8.8.8andnameserver 1.1.1.1to/etc/resolv.conf - Flush cache:
sudo systemd-resolve --flush-caches - Windows:
ipconfig /flushdns - Restart resolver:
sudo systemctl restart systemd-resolved
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
- Find bandwidth hogs:
sudo nethogs eth0 - Check duplex:
ethtool eth0 - Switch Wi-Fi to 5GHz band
- If VPS: may be noisy neighbor — contact provider
MediumSSH connection refused on port 22
Diagnosis
nc -zv host 22
systemctl status sshd
ss -tlnp | grep 22
ufw status
Solution
- Start SSH:
sudo systemctl start sshd && sudo systemctl enable sshd - Open firewall:
sudo ufw allow 22/tcp - If port changed:
ssh -p 2222 user@host
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
- Renew cert:
sudo certbot renew --force-renewal - Auto-renew cron:
0 12 * * * certbot renew --quiet - Check system clock:
timedatectl status— wrong date breaks SSL
HighPort 80/443 not accessible from outside
Diagnosis
ss -tlnp | grep -E "80|443"
sudo ufw status
curl -I http://localhost
Solution
- Open firewall:
sudo ufw allow 80/tcp && sudo ufw allow 443/tcp - Ensure server binds to 0.0.0.0 not 127.0.0.1
- Cloud: add inbound rules in security group
- Restart web server:
sudo systemctl restart nginx
LowVPN connected but no internet access
Solution
- Check routing:
ip route show— look for 0.0.0.0/0 via VPN - Enable split tunneling in VPN client
- Set DNS to 8.8.8.8 while VPN is on
- OpenVPN: remove
redirect-gateway def1from config
MediumNetwork interface not showing IP address
Solution
- List interfaces:
ip link show - Bring up interface:
sudo ip link set eth0 up - Request DHCP:
sudo dhclient eth0 - Set static IP:
sudo ip addr add 192.168.1.100/24 dev eth0
Security Problems
30 problemsHighServer 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
- Install fail2ban:
sudo apt install fail2ban && sudo systemctl enable fail2ban - Disable password auth: set
PasswordAuthentication noin/etc/ssh/sshd_config - Change SSH port:
Port 2222in sshd_config - Allowlist your IP:
sudo ufw allow from YOUR_IP to any port 22 - Reload:
sudo systemctl reload sshd
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
- Take site offline immediately
- Restore from last known clean backup
- Change ALL passwords: FTP, DB, CMS admin, hosting panel
- Update CMS and plugins to patch entry point
- Add Cloudflare WAF — free plan blocks most attacks
HighRansomware encrypted files on server
Solution
- Isolate server immediately — disconnect from network
- Do NOT pay the ransom
- Check nomoreransom.org for free decryptors
- Restore from offline backup
- Report to your national cybercrime unit
- After restore: patch entry vector, enable EDR, set up immutable backups
MediumAPI keys accidentally pushed to GitHub
Solution
- Revoke the exposed key IMMEDIATELY
- Remove from history:
git filter-repo --path secrets.env --invert-paths - Force push:
git push origin --force --all - Add to .gitignore:
echo ".env" >> .gitignore - Use environment variables or secrets manager going forward
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;
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
- Use parameterized queries:
cursor.execute("SELECT * FROM users WHERE id = %s", (user_input,)) - Use an ORM (SQLAlchemy, Django ORM) — handles escaping automatically
- Validate and whitelist input types — if expecting integer, cast to int first
- Add WAF to catch exploitation attempts
Linux Problems
28 problemsHighDisk 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
- Clear old logs:
sudo journalctl --vacuum-size=100M - Remove old kernels:
sudo apt autoremove --purge - Clean apt cache:
sudo apt clean - Delete large temp files:
sudo find /tmp -size +50M -delete - Truncate log:
sudo truncate -s 0 /var/log/syslog
HighCPU at 100% — server crawling
Diagnosis
top
ps aux --sort=-%cpu | head -10
htop
Solution
- Kill runaway process:
kill -9 PID - Lower priority:
renice +10 PID - Check for crypto miners:
ps aux | grep -i "xmrig\|minerd" - Limit CPU in systemd service: add
CPUQuota=50%
HighPermission denied errors on files
Diagnosis
ls -la /path/to/file
whoami
id
stat /path/to/file
Solution
- Make executable:
chmod +x script.sh - Change ownership:
sudo chown user:group /path - Web dir perms:
sudo chown -R www-data:www-data /var/www - Add to group:
sudo usermod -aG groupname username
MediumService fails to start after reboot
Diagnosis
systemctl status servicename
journalctl -u servicename -n 50
Solution
- Enable auto-start:
sudo systemctl enable servicename - Fix config errors shown in journal
- Check for port conflicts:
ss -tlnp | grep PORT - Reload daemon:
sudo systemctl daemon-reload
MediumOut of memory — OOM killer killing processes
Diagnosis
free -h
dmesg | grep -i "oom\|killed"
ps aux --sort=-%mem | head -10
Solution
- Add swap:
sudo fallocate -l 2G /swapfile && sudo chmod 600 /swapfile && sudo mkswap /swapfile && sudo swapon /swapfile - Make permanent: add
/swapfile none swap sw 0 0to/etc/fstab - Tune:
sudo sysctl vm.swappiness=10
Mediumcron job not running as expected
Diagnosis
grep CRON /var/log/syslog | tail -20
crontab -l
systemctl status cron
Solution
- Test cron syntax at crontab.guru
- Cron uses minimal PATH — use full paths:
/usr/bin/python3notpython3 - Redirect output to log:
* * * * * /script.sh >> /var/log/myjob.log 2>&1 - Check cron is running:
sudo systemctl start cron
Cloud Problems
24 problemsHighAWS bill unexpectedly high — cost spike
Common culprits
NAT Gateway transfer, forgotten EC2 instances, S3 request spikes, unattached Elastic IPs
Solution
- Identify spike: AWS Console → Cost Explorer → by service
- Set billing alarm in CloudWatch
- Enable AWS Budgets — email alert before threshold hit
- Use Reserved Instances for predictable workloads (saves 40-70%)
- Use AWS Trusted Advisor to find idle resources
HighLocked out of EC2 after security group change
Solution
- AWS Console → EC2 → Security Groups → Edit Inbound Rules
- Add SSH rule: Port 22, Source: My IP
- For future: use AWS Systems Manager Session Manager (no port 22 needed)
HighS3 bucket accidentally made public
Solution
- Block immediately: S3 → Bucket → Permissions → Block all public access → Enable
- Via CLI:
aws s3api put-public-access-block --bucket BUCKET --public-access-block-configuration "BlockPublicAcls=true,BlockPublicPolicy=true,IgnorePublicAcls=true,RestrictPublicBuckets=true" - Enable S3 Block Public Access at account level
MediumKubernetes pod stuck in CrashLoopBackOff
Diagnosis
kubectl get pods
kubectl describe pod POD_NAME
kubectl logs POD_NAME --previous
Solution
- Read crash logs — root cause is almost always in there
- Common causes: missing env vars, wrong image, misconfigured liveness probe
- Exit code 137 = OOMKilled — increase memory limit
- Restart deployment:
kubectl rollout restart deployment/NAME
DevOps Problems
24 problemsHighDocker container exits immediately after start
Diagnosis
docker ps -a
docker logs CONTAINER_ID
docker run -it IMAGE /bin/sh
Solution
- Exit code 1 = app error — check logs
- Exit code 137 = OOM killed — increase
--memorylimit - Add CMD to Dockerfile:
CMD ["python", "app.py"] - Pass env vars:
--env-file .env
HighCI/CD pipeline failing on every push
Solution
- Read the full CI log — don't just see "failed", find WHY
- Missing secrets: add to GitHub Settings → Secrets and variables
- Pin runtime version in workflow:
node-version: '20' - Reproduce locally with
acttool
MediumNginx 502 Bad Gateway
Diagnosis
sudo tail -f /var/log/nginx/error.log
systemctl status gunicorn
curl http://localhost:8000
Solution
- 502 = nginx can't reach backend — start the backend service
- Check proxy_pass port matches where backend actually runs
- Increase timeout:
proxy_read_timeout 300; - Reload:
sudo nginx -t && sudo systemctl reload nginx
MediumGit push rejected — non-fast-forward
Solution
- Pull and rebase:
git pull --rebase origin main - Resolve any conflicts, then push again
- Never force push to shared branches without team consent
Database Problems
24 problemsHighMySQL 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
- Add index:
CREATE INDEX idx_email ON users(email); - Enable slow query log:
SET GLOBAL slow_query_log = 1; - Composite index for multi-column WHERE:
CREATE INDEX idx ON table(col1, col2); - Update stats:
ANALYZE TABLE users;
HighAccidentally deleted data — no backup
Solution
- Stop writes immediately
- MySQL binary log recovery:
mysqlbinlog --start-datetime="2026-07-03 08:00:00" /var/lib/mysql/mysql-bin.000001 | mysql -u root -p - PostgreSQL: use Point-in-Time Recovery if WAL archiving was on
- Check replica — promote before it syncs the delete
- Lesson: always test backups, always use transactions
HighToo many connections — connection pool exhausted
Diagnosis
SHOW STATUS LIKE 'Threads_connected';
SHOW VARIABLES LIKE 'max_connections';
SHOW FULL PROCESSLIST;
Solution
- Increase limit:
SET GLOBAL max_connections = 500; - Add connection pooling: PgBouncer (PostgreSQL) or ProxySQL (MySQL)
- Find connection leaks — ensure app closes connections after use
- Set idle timeout:
SET GLOBAL wait_timeout = 60;
MediumDeadlock errors in database logs
Diagnosis
SHOW ENGINE INNODB STATUS\G
-- Look for LATEST DETECTED DEADLOCK section
Solution
- Always access tables in the same order across transactions
- Keep transactions short — don't hold locks during non-DB work
- Lower isolation: READ COMMITTED vs REPEATABLE READ
- Add retry logic in app for error code 1213
Hardware Problems
22 problemsHighServer overheating — thermal throttling
Diagnosis
sensors
dmesg | grep -i "thermal\|throttl"
Solution
- Clean dust from fans — compressed air every 6-12 months
- Replace thermal paste on CPU — degrades after 3-5 years
- Ensure proper airflow — hot exhaust not recirculating as intake
- Check fan speeds via
sensors— 0 RPM = fan failed
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
- SMART shows FAILED = backup ALL data NOW, drive will die soon
- Watch reallocated_sector_ct — any non-zero = serious
- Set up monitoring:
sudo apt install smartmontools && sudo systemctl enable smartd - Replace drive before failure — RAID is not a backup
MediumRAM causing random crashes — memtest errors
Diagnosis
sudo apt install memtester
sudo memtester 1G 1
# Or: boot memtest86+ from USB
Solution
- Any memtest errors = faulty RAM
- Remove sticks one at a time to isolate bad one
- Reseat RAM firmly in slot
- Try different slots — could be motherboard fault
Compliance Problems
20 problemsHighGDPR violation — user data without consent
Solution
- Add cookie consent banner before loading any tracking scripts
- Publish Privacy Policy and Cookie Policy pages
- Implement consent management: Cookiebot, OneTrust, or open-source Klaro
- Document legal basis for all data processing
- Add "Delete My Data" option for right to erasure
HighPCI DSS — storing plain-text card data
Solution
- Delete all stored card data immediately
- Use a payment processor — Stripe, Braintree — never touch raw card data
- Tokenize: processor returns token you charge later
- Never store CVV under any circumstances — prohibited by PCI DSS
MediumAudit log gaps — missing activity records
Solution
- Enable DB audit logging: MySQL audit plugin or PostgreSQL pgaudit
- Log all admin actions: who, what, when, from which IP
- Ship logs to immutable storage — attacker can't delete what they can't reach
- Retention: SOC 2 = 1 year minimum, PCI DSS = 1 year minimum