[LUG.ro] CUPS a través de una vpn LAN-a-LAN

Mario OROZ mario.oroz en gmail.com
Mie Sep 24 14:14:03 ART 2014


El 17/09/2014 a las 10:16 p.m., Gabriel Parrondo escibió:
> El sep 17, 2014 2:58 p.m., "Mario OROZ" <mario.oroz en gmail.com> escribió:
>> Hola gente.
>> Tengo dos redes conectadas por una vpn: LAN1 = 192.168.1.0/24
>> y LAN2 = 192.168.3.0/24
>>
>> Estoy tratando de agregar unas impresoras (una impresora con IP conectada
> a la LAN y
>> una compartida en un puesto WIN32) de la LAN2 en el servidor CUPS alojado
> en la
>> LAN1.
>>
>> El tema es que desde el browser de una PC en la LAN2 apunto la direccion
>> 192.168.1.55:631 del server CUPS
> La configuración default de CUPS en varias distro requiere acceso cifrado
> para autenticar equipos remotos. Podrías probar con https://192.168.1.55:631
>
> Si esto no ayuda, podrías copiar tu cupsd.conf aquí así vemos mejor que
> pasa?
> _______________________________________________
>

Hola Gabriel,
El acceso cifrado se logra, incluso tuve algunos problemas con el tema del ssl,
porque
al instale el server con una ip y despues la cambie, por lo que el certificado
no apuntaba
al mismo common name, eso lo arregle.

El tema es que desde un navegador de una PC en la red 3.0 no puedo agregar una
impresora (esta
impresora no importa tanto en que red esté!)  en el servidor cups que esta en la
red 1.0
Por comodidad quisiera poder agregar impresoras desde ambas redes.

Asi que agregue la impresora desde un browser en una PC de la red 1.0, se agrego
bien, y la
impresión cruza la vpn e imprime perfecto, cabe aclarar que es una impresora de
red, no
intente instalar aun una compartida desde win32.

este es mi cupsd.conf:

MaxLogSize 0
#
# "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $"
#
# Sample 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

# Administrator user group...
SystemGroup sys root


# Only listen for connections from the local machine.
Listen localhost:631
Listen 192.168.1.50:631
Listen comp50.intranet.sitio.com.ar
Listen /var/run/cups/cups.sock
#Port 631

# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseLocalProtocols CUPS dnssd

###DefaultEncryption Never
DefaultEncryption Required
ServerCertificate /etc/cups/ssl/server.crt
# Default authentication type, when authentication is required...
DefaultAuthType Basic

# Restrict access to the server...
<Location />
  Order allow,deny
  Allow 192.168.1.0/24
  Allow 192.168.3.0/24
</Location>

# Restrict access to the admin pages...
<Location /admin>
  Order allow,deny
  Allow 192.168.1.0/24
  Allow 192.168.3.0/24
</Location>

# Restrict access to configuration files...
<Location /admin/conf>
  AuthType Default
  Require user @SYSTEM
  Order allow,deny
  Allow 192.168.1.0/24
  Allow 192.168.3.0/24
</Location>

# Set the default printer/job policies...
<Policy default>
  # Job-related operations must be done by the owner or an administrator...
  <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 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 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-related operations must be done by the owner or an administrator...
  <Limit Create-Job Print-Job Print-URI>
    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 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 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>

#
# End of "$Id: cupsd.conf.in 8805 2009-08-31 16:34:06Z mike $".
#



Desde ya gracias.
Mario.

---
Este mensaje no contiene virus ni malware porque la protección de avast! Antivirus está activa.
http://www.avast.com



Más información sobre la lista de distribución Lugro