This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
сервис_cups [2023/10/23 13:34] val |
сервис_cups [2023/11/29 15:31] val |
||
---|---|---|---|
Line 5: | Line 5: | ||
* [[https://habr.com/ru/articles/443094/|Настройка с нуля принтсервера CUPS с доменной авторизацией и без нее в сети с разными ОС]] | * [[https://habr.com/ru/articles/443094/|Настройка с нуля принтсервера CUPS с доменной авторизацией и без нее в сети с разными ОС]] | ||
- | * [[https://github.com/mrccnt/imap-print]] | + | * [[https://play.google.com/store/apps/details?id=io.github.benoitduffez.cupsprint&hl=ru|CUPS Printing для Android]] |
===== Установка CUPS ===== | ===== Установка CUPS ===== | ||
Line 59: | Line 59: | ||
* Можно настроить доступ по ссылке: | * Можно настроить доступ по ссылке: | ||
<code> | <code> | ||
- | http://192.168.1.158:631/printers/RICOH_SP_111_DDST Windows HP PS | + | http://192.168.1.181:631/printers/RICOH_SP_111_DDST Windows (HP PS) |
- | ipp://192.168.1.158:631/printers/RICOH_SP_111_DDST Linux Ricoh IPP Everywhere | + | ipp://192.168.1.181:631/printers/RICOH_SP_111_DDST Linux (Ricoh IPP Everywhere) |
</code> | </code> | ||
- | ==== Настройка доступа к принтеру по сети через mdns и dns-sd ==== | + | ==== Настройка доступа к принтеру по сети ==== |
+ | |||
+ | === Через mdns и dns-sd === | ||
* [[https://xakep.ru/2019/12/16/multicast-dns-pentest/|Игра на доверии. Пентестим Multicast DNS и Service discovery]] | * [[https://xakep.ru/2019/12/16/multicast-dns-pentest/|Игра на доверии. Пентестим Multicast DNS и Service discovery]] | ||
- | * [[https://www.cups.org/doc/network.html|Using Network Printers]] | + | * [[https://wiki.archlinux.org/title/avahi|Avahi is a free zero-configuration networking (zeroconf) implementation, including a system for multicast DNS/DNS-SD service discovery]] |
- | * [[https://wiki.archlinux.org/title/avahi|Avahi]] | + | |
* [[https://serverfault.com/questions/143184/how-do-i-get-the-machine-name-from-an-ip-via-multicast-dns|How do I get the machine name from an IP via Multicast DNS?]] | * [[https://serverfault.com/questions/143184/how-do-i-get-the-machine-name-from-an-ip-via-multicast-dns|How do I get the machine name from an IP via Multicast DNS?]] | ||
Line 74: | Line 75: | ||
$ dig @224.0.0.251 -p 5353 -t ptr _printer._tcp.local | $ dig @224.0.0.251 -p 5353 -t ptr _printer._tcp.local | ||
+ | |||
+ | $ dig @224.0.0.251 -p 5353 +short NPID78751.local | ||
+ | |||
+ | # apt install libnss-mdns | ||
+ | |||
+ | $ getent hosts NPID78751.local | ||
# apt install avahi-utils | # apt install avahi-utils | ||
Line 80: | Line 87: | ||
$ avahi-browse --resolve _printer._tcp | $ avahi-browse --resolve _printer._tcp | ||
+ | |||
+ | $ lpinfo --include-schemes dnssd -v | ||
</code> | </code> | ||
+ | === Отключение авто обнаружения принтеров === | ||
+ | |||
+ | <code> | ||
+ | [root@val-299-alt ~]# cat /etc/cups/printers.conf | grep '<Printer' | ||
+ | |||
+ | [root@val-299-alt ~]# systemctl disable cups-browsed --now | ||
+ | |||
+ | [root@val-299-alt ~]# > /etc/cups/printers.conf | ||
+ | |||
+ | [root@val-299-alt ~]# systemctl restart cups | ||
+ | </code> | ||
+ | |||
+ | === Через ip адрес или dns имя === | ||
+ | |||
+ | * [[https://www.cups.org/doc/network.html|Using Network Printers]] | ||
+ | * [[https://docs.oracle.com/cd/E36784_01/html/E36821/gmfou.html|How to Add a Network Printer on a Different Subnet by Using CUPS Commands]] | ||
+ | |||
+ | <code> | ||
+ | # ping 10.5.11.60 | ||
+ | |||
+ | # lpinfo -m | ||
+ | |||
+ | # lpinfo -m | grep HP | ||
+ | |||
+ | # lpadmin -p OLDHP -E -v socket://10.5.11.60 -m drv:///sample.drv/laserjet.ppd | ||
+ | |||
+ | # lpadmin -p NEWYounger2009Printer -E -v ipp://10.5.11.60/ipp/print -m everywhere | ||
+ | |||
+ | |||
+ | [root@val-299-alt ~]# ping Canonf77e20.local.bmstu.ru | ||
+ | |||
+ | [root@val-299-alt ~]# lpadmin -p Canonf77e20 -E -v ipp://Canonf77e20.local.bmstu.ru/ipp/print -m everywhere | ||
+ | </code> | ||