I have a Host running Leap 15.6. [tw2l6].
On this host I have installed two VirtualBox Hosts: vblp(Leap 15.6) and vbtw(Tumbleweed).
If I access from tw2l6 the cups webpage at vblp I get “Forbidden”.
If I access from tw2l6 the cups webpage at vbtw I get the normal Cups Web Page.
vblp has CUPS 2.4.14 installed from “Vendor: obs://build.opensuse.org/Printing”.
vbtw has CUPS 2.4.14 installed from “Vendor: openSUSE”.
(Several test to get ipps printing lead me to this version)
Both VBs have the same cupd.conf file which shows:
<Location />
# Allow remote administration...
Order allow,deny
Allow @LOCAL
</Location>
(the other “Location” entries contain the same “Allow @LOCAL” line)
I noticed that I get access to vblp by using it’s IP4 address instead of it’s name.
BUT
I get “Forbidden” by using it’s IPv6 address.
!! For me Tumbleweed work as expected but Leap does not. !!
What determines whether an address is assigned to LOCAL or not?
Using “Allow All” instead of “Allow @LOCAL” is a bad workaround.
What do I have to check/compare/change?
What address family is cupsd listening on with each host?
ss -lntp | grep 631
Clearly, CUPS on Leap does not classify that IPv6 address as local.
See what IP addresses are returned for each host:
getent hosts vblp
getnent hosts vbtw
ip address
Leap may be resolving the hostname to a global IPv6 address perhaps?
You could also try mDNS resolution. Using <hostname>.local forces mDNS resolution (via Avahi) to a local interface address, usually link-local IPv6 (fe80::) or IPv4, which should work.
This will demonstrate whether the issue is name resolution / address classification rather than your configuration.
@ deano_ferrari
Your suggestion about getent was very helpful.
It allowed me to identify very different contents in the /etc/hosts files.
I tried using getent(1), hosts(1), nslookup(1) and ping(1) to achieve reliable and consistent results on all affected machines.
I succeeded, although I don’t fully understand the behavior of ping(1) yet.
Now I’m trying to use wireshark(1) to find out which IP address (IPv4 or IPv6) is used to connect to the remote cupsd port.
I still need to delve deeper to find the desired information within this large amount of data.
For now, thank you for your help.