willswire / balenaPrint

Managed CUPS on Raspberry Pi devices, running balenaOS
https://hub.balena.io/
Apache License 2.0
92 stars 34 forks source link

Unable to print from client on same subnet #1

Closed rahul-thakoor closed 4 years ago

rahul-thakoor commented 4 years ago

Unable to print from a shared printer on the network unless I also enable "Allow printing from the internet" in server settings: image

Expected behavior: When sharing a printer, clients on the same network should be able to print to that printer.

Actual behavior: The client is able to discover printer but when trying to print, presented with "You do not have permission to use this printer". Must enable Allow printing from the internet" in server settings for it to work.

rahul-thakoor commented 4 years ago

hey @willswire do you know how we can enable that automatically in the conf file or modify it so that it handles jobs on the same network?

have you experienced this issue?

rahul-thakoor commented 4 years ago
--- a/cups/cupsd.conf
+++ b/cups/cupsd.conf
@@ -3,10 +3,8 @@
 # Log warning activity
 LogLevel warn
 PageLogFormat
-
-# Listen on Port 80
-Listen 80
-Listen 631
+# Allow remote access
+Port 80
 Listen /run/cups/cups.sock

 # Modify ServerAlias
@@ -25,8 +23,9 @@ WebInterface Yes

 # Open access to the server
 <Location />
+  # Allow remote access...
   Order allow,deny
-  Allow from 52.4.252.97
+  Allow all
 </Location>

 # Open access to the admin pages

this seems to enable it. Any thoughts? Can we upstream this?

willswire commented 4 years ago

@rahul-thakoor these changes look good! can you submit a PR and we can get them upstreamed?

Sorry for the late response - I appreciate your contribution! 😁