CUPS how to limit access to Web admin page to my IP address range?

Latest response

Hello,

I followed this document and managed to add a user to access the CUPS admin page via web.
https://access.redhat.com/solutions/35312

I looked at many other CUPS pages, but there is too much generic information. I would like to limit access to my corporate network. In that article it says to set Listen 0.0.0.0:631, but that gives access to any machine. Correct? Can someone explain what this actually means?

I added my Linux user and IP address range to these sections, so it seems to work:

# Restrict access to the server...
<Location />
  Order allow,deny
# Enable this, so the web page is displayed properly...
  Require user @SYSTEM user1
  Allow 172.18.*.* 10.142.*.*
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Require user @SYSTEM user1
  Allow 172.18.*.* 10.142.*.*
</Location>

How do those work in conjunction with Listen 0.0.0.0 ?

I also tried to change the Listen IP address, like 172.18.0.0, but it does not allow to access the admin page.

What does the 0.0.0.0 mean? Should it be my server host name or my server host IP address?

Thanks in advance.
Ryszard

Responses