sudo apt install cups -y
sudo cp -n /etc/cups/cupsd.conf /etc/cups/cupsd.conf.bak
sudo nano /etc/cups/cupsd.conf
# Listen for connections from the local machine
Listen 192.168.0.15:631
# Restrict access to the server
<Location />
Order allow,deny
Allow 192.168.0.0/24
</Location>
# Default authentication type, when authentication is required
DefaultAuthType Basic
DefaultEncryption IfRequested
# Web interface setting
WebInterface Yes
# Restrict access to the admin pages
<Location /admin>
Order allow,deny
Allow 192.168.0.0/24
</Location>
sudo service cups restart
sudo adduser $USER lp
sudo adduser $USER lpadmin
update-rc.d enable cups