FreeIPA is an open-source project that provides centralized user authentication and access control by combining various technologies, including LDAP directory services, Kerberos authentication, and DNS. In this tutorial, we’ll guide you through the process of installing FreeIPA on Debian Latest.
Before starting the installation, make sure you have the following prerequisites on your system:
First, update your Debian system and install the packages required for FreeIPA installation, including Python packages, Apache, and mod_wsgi. To do this, run the following command:
sudo apt update
sudo apt install -y python3 python3-dnspython apache2 libapache2-mod-wsgi-py3 iproute adcli sssd
Once the required packages are installed, you can configure your FreeIPA server by installing the freeipa-server
package, which will install all the necessary dependencies and set up the FreeIPA server. To install the package, run the following command:
sudo apt install -y freeipa-server
During the installation, you’ll be asked to provide a domain name for the FreeIPA realm. Specify the domain name that you want to use for FreeIPA and complete the installation process.
Next, configure your firewall to allow traffic to the necessary user ports used by FreeIPA. To do this, run the following commands:
sudo ufw allow 80/tcp
sudo ufw allow 88/tcp
sudo ufw allow 389/tcp
sudo ufw allow 443/tcp
sudo ufw allow 464/tcp
sudo ufw allow 636/tcp
sudo ufw allow 88/udp
sudo ufw allow 464/udp
To enable the FreeIPA web interface, you need to configure the Apache webserver. First, enable the required Apache modules by running the following command:
sudo a2enmod ssl headers proxy proxy_http xml2enc
Next, create a new file named freeipa.conf
in the Apache sites-available directory and add the following configuration:
<VirtualHost *:443>
# you can set the ServerName directive to the DNS name or IP address of the server
# e.g. ServerName example.com
ServerName localhost
# enable SSL
SSLEngine on
# specify the location of your SSL certificate and key files
SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
# redirect http to https
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]
# FreeIPA web UI path
ProxyPass /ipa/ https://localhost/ipa/
ProxyPassReverse /ipa/ https://localhost/ipa/
# enable headers
Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
Header always set X-Frame-Options "SAMEORIGIN"
Header always set X-XSS-Protection "1; mode=block"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "no-referrer"
</VirtualHost>
Save the file and enable the virtual host by running the following command:
sudo a2ensite freeipa
Restart the Apache service to apply the changes:
sudo systemctl restart apache2
Congratulations! You have successfully installed and configured FreeIPA on Debian Latest. To log in to the FreeIPA web interface, open your web browser and go to:
https://your_server_ip_address/ipa/ui/
You should see a login page. Enter the username admin
and the password that you specified during the FreeIPA server installation.
After logging in, you’ll be able to manage users, groups, and other resources through the FreeIPA web interface.
In this tutorial, we showed you how to install FreeIPA on Debian Latest and configure the FreeIPA web interface. FreeIPA is a powerful tool for centralized user authentication and access control, so give it a try and see how it can help you manage and secure your systems!
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!