Difference between revisions of "Configuring LPR"

From SlugWiki
Jump to: navigation, search
 
Line 4: Line 4:
 
To print to a printer with a JetDirect:
 
To print to a printer with a JetDirect:
  
#juntonian
+
  juntonian|:
juntonian|:
+
 
   :lp=juntonian.bemix%9100:
 
   :lp=juntonian.bemix%9100:
 
   :ifhp=model=hp8000:
 
   :ifhp=model=hp8000:
Line 11: Line 10:
 
   :sd=/var/spool/lpd/%P:
 
   :sd=/var/spool/lpd/%P:
  
juntonian|: - specifies the queue on the server
+
*juntonian|: - specifies the queue on the server
lp=juntonian.bemix%9100 - tells lpd to send the document to the address and port of the printer
+
*lp=juntonian.bemix%9100 - tells lpd to send the document to the address and port of the printer
ifhp=model=hp8000 - tells lpd to use ifhp's filter for correct rendering of the document
+
*ifhp=model=hp8000 - tells lpd to use ifhp's filter for correct rendering of the document
filter=/usr/lib/ifhp/ifhp - location of this filter file varies
+
*filter=/usr/lib/ifhp/ifhp - location of this filter file varies
sd=/var/spool/lpd/%P - spooling directory
+
*sd=/var/spool/lpd/%P - spooling directory
  
 
===/etc/lprng/lpd.perms===
 
===/etc/lprng/lpd.perms===
Line 23: Line 22:
 
need:
 
need:
  
# Make lpd work from Athena (Athena has a setuid lpq/lpr and so will use ports < 1024)
+
*Make lpd work from Athena (Athena has a setuid lpq/lpr and so will use ports < 1024)
client_lpd_ports="any"
+
**client_lpd_ports="any"
  
# Under internal NIC
+
* Under internal NIC
server lpd accept
+
** server lpd accept
  
# Under external NIC
+
*Under external NIC
server lpd accept
+
  server lpd accept
server custom lpdcli "tcp/721:731" "default" accept
+
  server custom lpdcli "tcp/721:731" "default" accept
server custom lpdsrv "tcp/515" "default" accept
+
  server custom lpdsrv "tcp/515" "default" accept
  
# Under router wan2lan inface ...
+
* Under router wan2lan inface ...
route lpd accept
+
** route lpd accept

Revision as of 09:26, 9 April 2009

Install lprng, ifhp

/etc/lprng/printcap

To print to a printer with a JetDirect:

 juntonian|:
 :lp=juntonian.bemix%9100:
 :ifhp=model=hp8000:
 :filter=/usr/lib/ifhp/ifhp:
 :sd=/var/spool/lpd/%P:
  • juntonian|: - specifies the queue on the server
  • lp=juntonian.bemix%9100 - tells lpd to send the document to the address and port of the printer
  • ifhp=model=hp8000 - tells lpd to use ifhp's filter for correct rendering of the document
  • filter=/usr/lib/ifhp/ifhp - location of this filter file varies
  • sd=/var/spool/lpd/%P - spooling directory

/etc/lprng/lpd.perms

To print from outside of localhost, you have to comment out the REJECT statements in this file

/etc/firehol/firehol.conf

need:

  • Make lpd work from Athena (Athena has a setuid lpq/lpr and so will use ports < 1024)
    • client_lpd_ports="any"
  • Under internal NIC
    • server lpd accept
  • Under external NIC
 server lpd accept
 server custom lpdcli "tcp/721:731" "default" accept
 server custom lpdsrv "tcp/515" "default" accept
  • Under router wan2lan inface ...
    • route lpd accept