AccessLog /var/log/cups/access_log #Access Log location
AccessLogLevel all #Log everything temporarily for testing purposes
ErrorLog /var/log/cups/error_log #Error logs are a good thing to have when debugging
LogLevel warn # I set this to debug2 while debugging printer errors with the config
LogTimeFormat standard # I like standard logs
MaxLogSize 1m # After each log gets to 1mb, it rotates the log file..ever tried to grep a 100mb log file? hahaha
# Allow remote access
Port 631 # Allows cups to listen on an external interface for printing
ServerAdmin jayson@dino # your name, at your local machine or external email address
# Enable printer sharing and shared printers.
Browsing On #Broadcast me
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS #I only want to know about other cups servers
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS
BrowseInterval 30 # 30 seconds browse interval
BrowsePort 631 #hey, it’s that port again!
BrowseProtocols cups lpd smb #Protocols are cups, lpd, and samba
BrowseShortNames Yes #sure why not
BrowseTimeout 60 # Time out after 60 seconds
MaxClients 30 # As this is a small house, for safety/security reasons I set my max clients to 30, defaults to 100..if I have 100 clients connecting to print jobs, I need a bigger house!
MaxClientsPerHost 30 # This says the max # of jobs per host is 30, if one of my clients is printing more than 30 print jobs, I have a problem
MaxJobs 500 # No more than 500 jobs at any given time...once again, holy crap
AutoPurgeJobs Yes # Purges jobs once all is said and done
JobRetryInterval 60 # Instead of ‘stopping’ the printer when there is an error, this will retry the job every 60 seconds, (see Jobretrylimit) 5x...if I can’t put paper in the printer in 5 minutes..then the job will die
JobKillDelay 30 # in seconds
JobRetryLimit 5
DefaultAuthType Basic # Basic Authentication
DefaultLanguage en # Yes, I speak english
DefaultPaperSize Auto
DefaultShared yes # Why not? My printers should be shared
DirtyCleanInterval 30
ErrorPolicy retry-job # This says if there is an error, retry the job instead of stopping the printer..which is a PITA to log in and restart the printer
FatalErrors config # You will error out on a bad config...Bad Config! no cookie for you!
KeepAlive On # Http timeout
KeepAliveTimeout 30 # 30 seconds
HostNameLookups Off # I don’t use DNS in the house, no need to loop attempting to look up the hostname
PreserveJobHistory On # I want to see what’s printed and how often, maybe to justify a new printer?
PreserveJobFiles Off #eh, could care less
<Location />
# Allow shared printing and remote administration...
Order allow,deny
Allow from 192.168.1.* #Only allow access to the cups pages from my local subnet
</Location>
<Location /admin>
AuthType Basic
Require user @SYSTEM
# Allow remote administration...Requires a user or root permission
Order allow,deny
Allow from 192.168.1.*
</Location>
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
# Allow remote access to the configuration files...
Order allow,deny
Allow all
</Location>
<Policy default>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
<Limit All>
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
</Policy>
<Policy authenticated>
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
Allow From 127.0.0.1
Allow From 192.168.1.*
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>