ログイン

21
6月

CUPS 外出先から自宅のプリンタに印刷

Written by チキチキ. CUPS 外出先から自宅のプリンタに印刷 はコメントを受け付けていません Posted in: Linux
Tagged with
Posted Date : 2012-06-21

自宅のプリンタに外出先から印刷出来る様にしてみました。

自宅サーバーにはCUPSが動いていますので、
CUPSの設定をちょちょいと変更するだけで動きました。
/etc/cups/cupsd.confの設定を以下の様に書きます。

MaxLogSize 0
LogLevel warn
SystemGroup sys root
# Allow remote access
Port 631
# Enable printer sharing and shared printers.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseRemoteProtocols CUPS
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS dnssd
ServerAlias *

<Location />
# Allow shared printing…
Order allow,deny
Allow all
</Location>
<Location /admin>
Encryption Required
# Restrict access to the admin pages…
Order allow,deny
</Location>

—続く—

ポイントとしては、ServerAlias * を記述する事かな。
これを書かないと「400 Bad Request」が返されます。
あと、プリンタの管理はパスワードブロックする事。
本当はいたずら防止の為に出力時にもパスワードロック掛ければ
良いのだけどそれはこの次のステップでチャレンジです。

クライアント側(Windows)のポート指定に、
http://ドメイン名:631/printers/プリンタ名
を記述して普通にプリンタドライバをインストールすれば終わり。

これで自宅のプリンタに出力できましたが、それで何が便利になったかって?
とりあえずやってみただけです。

—————————————————————
追記)
通常出力時にもID/パスワードを設定する事が出来ました。

<Location />
Require user @SYSTEM
# Allow shared printing…
Order allow,deny
Allow all
</Location>

これで、プリンタ設定時にユーザーID・パスワードを求められます。
また、クライアント側も
https://ドメイン名:631/printers/プリンタ名
になります。

Similar Posts:

Protected Image