How to safer in Linux for newbie
Written by vaheeD on April 12, 2021
1. Run updates any time you can
sudo apt-get update && apt-get upgrade
2. Enable firewall protection
sudo apt-get install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
ufw allow ssh
sudo ufw enable
3. Disable nonessential services that are prone to exploitation
sudo apt-get install systemd
systemctl list-units
Recognize which services could cause potential vulnerabilities to your system. For each service:
systemctl stop <service>
systemctl disable <service>
systemctl status <service>
4. Check for listening ports
netstat -tulpn
5. Scan for malware
sudo apt-get install clamav
sudo freshclam
sudo clamscan -r --bell -i /