* [Comm] P8: Listen localhost:631 не срабатывает в cupsd.conf
@ 2017-04-07 13:28 Четвериков К.В.
2017-04-11 4:55 ` Eugene Prokopiev
0 siblings, 1 reply; 3+ messages in thread
From: Четвериков К.В. @ 2017-04-07 13:28 UTC (permalink / raw)
To: community
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
Здравствуйте товарищи! В /etc/cups/cupsd.conf есть опция Listen
localhost:631, которая, как я понимаю, должна отвечать за доступность
cups только с localhost, но 631 порт светится на всю локалку:
lsof -i | grep cupsd
cupsd 1968 root 4u IPv6 8904 0t0 TCP *:ipp (LISTEN)
С другого ПК:
nmap 192.168.1.2
Starting Nmap 5.51 ( http://nmap.org ) at 2017-04-07 16:21 MSK
Host is up (0.000078s latency).
Not shown: 998 closed ports
PORT STATE SERVICE
22/tcp open ssh
631/tcp open ipp
MAC Address: *:*:*:*:*:* (ASRock Incorporation)
Nmap done: 1 IP address (1 host up) scanned in 0.16 seconds
Я что-то ещё проглядел для деактивации такого поведения или это баг?
--
С уважением,
Четвериков Константин
[-- Attachment #2: cupsd.conf --]
[-- Type: text/plain, Size: 4498 bytes --]
#
# Configuration file for the CUPS scheduler. See "man cupsd.conf" for a
# complete description of this file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel warn
PageLogFormat
# Deactivate CUPS' internal logrotating, as we provide a better one, especially
# LogLevel debug2 gets usable now
MaxLogSize 0
# Only listen for connections from the local machine.
Listen localhost:631
Listen /var/run/cups/cups.sock
# Show shared printers on the local network.
Browsing No
BrowseLocalProtocols none
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Web interface setting...
WebInterface Yes
# Restrict access to the server...
<Location />
Order allow,deny
</Location>
# Restrict access to the admin pages...
<Location /admin>
Order allow,deny
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# Set the default printer/job policies...
<Policy default>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
Order deny,allow
</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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<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
</Limit>
# All printer operations require a printer operator to authenticate...
<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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job/subscription privacy...
JobPrivateAccess default
JobPrivateValues default
SubscriptionPrivateAccess default
SubscriptionPrivateValues default
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI Validate-Job>
AuthType Default
Order deny,allow
</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 Cancel-My-Jobs Close-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<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>
# All printer operations require a printer operator to authenticate...
<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 Cancel-Jobs CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] P8: Listen localhost:631 не срабатывает в cupsd.conf
2017-04-07 13:28 [Comm] P8: Listen localhost:631 не срабатывает в cupsd.conf Четвериков К.В.
@ 2017-04-11 4:55 ` Eugene Prokopiev
2017-04-11 8:44 ` Четвериков К.В.
0 siblings, 1 reply; 3+ messages in thread
From: Eugene Prokopiev @ 2017-04-11 4:55 UTC (permalink / raw)
To: ALT Linux Community general discussions
7 апреля 2017 г., 16:28 пользователь Четвериков К.В.
<chetverikov@mann-schroeder.ru> написал:
> Здравствуйте товарищи! В /etc/cups/cupsd.conf есть опция Listen
> localhost:631, которая, как я понимаю, должна отвечать за доступность cups
> только с localhost, но 631 порт светится на всю локалку
Посмотрите на systemctl status cups.socket помимо systemctl status cups
--
WBR,
Eugene Prokopiev
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Comm] P8: Listen localhost:631 не срабатывает в cupsd.conf
2017-04-11 4:55 ` Eugene Prokopiev
@ 2017-04-11 8:44 ` Четвериков К.В.
0 siblings, 0 replies; 3+ messages in thread
From: Четвериков К.В. @ 2017-04-11 8:44 UTC (permalink / raw)
To: ALT Linux Community general discussions
Спасибо за наводку! Деактивация cups.socket (который в свою очередь
является симлинком на org.cups.cupsd.socket) решает проблему. Если
смотреть глубже, то в файле org.cups.cupsd.socket, нужно изменить
значение параметра ListenStream=631 на ListenStream=localhost:631, но
сохранить изменённый файл как /etc/systemd/system/cups.socket и сделать
systemctl reenable cups.socket.
Остаётся вопрос по поводу того, считать ли это фичей, или всё-же багом?
На мой взгляд, нужно по умолчанию этот файл поставлять с
ListenStream=localhost:631 в соответствии с cupsd.conf.
11.04.2017 07:55, Eugene Prokopiev пишет:
> 7 апреля 2017 г., 16:28 пользователь Четвериков К.В.
> <chetverikov@mann-schroeder.ru> написал:
>
>> Здравствуйте товарищи! В /etc/cups/cupsd.conf есть опция Listen
>> localhost:631, которая, как я понимаю, должна отвечать за доступность cups
>> только с localhost, но 631 порт светится на всю локалку
> Посмотрите на systemctl status cups.socket помимо systemctl status cups
>
--
С уважением,
Четвериков Константин
Тел. +7 (495) 617-617-2 доб. 212 Моб. +7 926 215 39 83
e-mail: chetverikov@mann-schroeder.ru www.mann-schroeder.ru
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-04-11 8:44 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-07 13:28 [Comm] P8: Listen localhost:631 не срабатывает в cupsd.conf Четвериков К.В.
2017-04-11 4:55 ` Eugene Prokopiev
2017-04-11 8:44 ` Четвериков К.В.
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git