Hi everyone, I have a problem that I can’t solve. I use letes’ encrypt as system certificate so by default. When I try to run cups, it recalls the real name of the server (neth7.internal2.lan) and not the name I entered as an alias then myserver.ddns.net. How can I modify the cups management so that it starts in configuration with the alias?
I assume myserver.ddns.net resolves to a public IP.
CUPS, for good security, only works with IPs from the internal network.
A workaround may be to set a DNS entry on your Neth for myserver.ddns.net to point to the internal LAN IP of the Neth CUPS server but there could be unwanted side effects.
At the end of
/etc/cups/cupsd.conf you need to add a line for the domain:
and restart CUPS (
systemctl restart cups).
If it works you need a custom template to make the changes in cupsd.conf permanent.
Hi Markuz, it’s been done for some time, in fact when I connect to the server via GUI, the address is myserver.ddns.net, also mail and more. I noticed that only cups calls itself at neth7.internal2.lan.
Yes, because the Neth GUI and other working services are not restricted to IP address range or domain names by default.
It seems cups uses local hostname.domainname by default unless you define a serveralias in cupsd.conf. I think it’s because cups is not intended to be available in public.
Ok, so what directive to use to enter an alias in cupsd.conf?
Anyway I tried the directions, but it’s as you say. You need to tell cupsd that it replies on alias so it must also use the default certificate which is lets’encrypt.
There shouldn’t be a problem with letsencrypt, it just checks if the domain is correct, the IP does not matter.
To make it permanent:
mkdir -p /etc/e-smith/templates-custom/etc/cups/cupsd.conf/ echo "ServerAlias myserver.ddns.net" > /etc/e-smith/templates-custom/etc/cups/cupsd.conf/90serveralias signal-event nethserver-cups-update
The DNS entry is important to resolve to internal IP.
It’s working here with my domain. I use letsencrypt too.
Yes Markuz, I’ve been using the alias eg for some time. myserver.ddns.net 192.168.3.83, but cups despite the indications of the template does not work, always redirects. At. the screenshot after making the changes to the template and asking for a service status.
Is the last line of
ServerAlias myserver.ddns.net ?
Is your Nethserver in Server (one green interface) or Gateway Mode? (at least one green, one red interface)
Yes the modification on cupsd.conf is correct as you say, serveralias myservewr.ddns.net. I only have a green interface.
@france are you using
Printers in the old servermanager to access the cups administration web-page?
If so, the url seems to be hard-coded
And in DNS on Neth you have an entry myserver.ddns.net pointing to 192.168.3.83 and your client PC is using Neth as DNS?
No I always have inseritor as an alias, no in the dns. Should I enter it as a record in the dns?
OK, so DNS entry seems correct. You may try to
ping myserver.ddns.net from a client to check if you get back the right internal IP.
So when you use a browser to browse to “myserver.ddns.net” you are redirected to “neth7.internal2.lan”?
I entered it as DNS entry, not as alias but it should be the same.
Hi Mark, I use it or rather I try to configure the printers from the old url to port 980
What happens if you enter
myserver.ddns.net:631/admin in the browser?
It works ! It seems that the error gives it if you invoke cups from GUI. Why ??