lets start step by step.
Devices:
REMOTESERVER = ubuntu server 12.04 (ip 95.211.132.49);
LOCALSERVER = ubuntu server 12.04 (public ip 195.91.166.141);
PRINTER_1 = TSC TTP-343C;
PRINTER_2 = HP LaserJet Pro M201dw;
Description:
LOCALSERVER (private ip 192.168.0.1) work as gateway. Both PRINTERS connected to the network by ethernet cable, so the have private ips (192.168.10.38 and 192.168.10.39). REMOTESERVER - apache + php server.
Objective: I want/need print two files from REMOTESERVER by click one button. First file should print on PRINTER_1, second file on PRINTER_2.
What Im doing: Im install CUPS (https://www.cups.org/) and LPR (http://www.wikiwand.com/en/Line_Printer_Daemon_protocol). After that Im add printers to CUPS. lpstat -p -d
show both printers. Next I print two files: 1.png by command:
lpr -P ttp 1.png
and 2.png by command:
lpr -P hp 2.png
so its work.
Problem: I cant print files by lpr command from REMOTEHOST. On REMOTESERVER I cant add printers because they have only a private ip. I have no idea how add printers on REMOTESERVER. I also tried add ip of LOCALSERVER and forwards port to one of printers, but it isn't help. I tried use http\ipp\socket and another protocol when I add printers in CUPS. So question is How I can add printer on REMOTESERVER.
Thx very much and sorry for my english.