Before connecting Debian to network, one must ensure its services and daemon is running at minimal and only needed. Otherwise, it is open for an attack. This section guides you on how to set services and daemon to minimal.
Here are the list of identified threats.
By default, RPC is installed for other packages' dependencies and it is not configured securely and is opened to external access.
By default, a lot of inetd
services are handled and not installed. However, should any of its service installed, one must configure the access safely.
By default, a lot of unattended daemon services are handled and not installed. However, should any of its service installed, one must configure the access safely.
These are the actions available for countermeasures.
The first step is to identify all unused daemon services and uninstall them whenever possible. This reduces the entry points to the lowest volumes possible.
Unless absolute necessary that you can't uninstall the daemon services, you should disable those unused ones with the following command:
$ update-rc.d name stop XX 2 3 4 5 .
In cases where you can't achieve both of the above, the final option is to setup a local firewall (iptable, ufw, etc.) and block all ports. Then whitelist necessary ports one at a time.
That's all for minimizing daemon service running during hardening efforts for Debian OS.