Once I needed to connect two HP LaserJet Pro M404dw printers to one computer, which were located far away in another office, so I forwarded ports on the router.
Through the web interface in the printer settings, I made sure that “Enable printing via TCP port 9100” was selected.
After that, on the new computer it was necessary to add two printers with the same IP 10.10.0.200, and then in the settings of the second printer change the RAW port to 9101.
In the router firewall where the printers themselves were located, I forwarded the ports:
External TCP 9100 to 192.168.24.151:9100
External TCP 9101 to 192.168.24.150:9100
I also specified in the rules the Src. Address from which the connection is allowed, so that the port is not publicly accessible.
In my case it was MikroTik, so I will show an example of port forwarding, open the menu IP – Firewall – NAT – Add New and add two rules:
Comment: printer-apteka-9100-https://ixnfo.com
Chain: dstnat
Src. Address: 192.168.5.5
Protocol: tcp
Dst. Port: 9100
In. Interface: wan-interface
Action: netmap
To Addresses: 192.168.24.151
To Ports: 9100
Comment: printer-mayak-9101-https://ixnfo.com
Chain: dstnat
Src. Address: 192.168.5.5
Protocol: tcp
Dst. Port: 9101
In. Interface: wan-interface
Action: netmap
To Addresses: 192.168.24.150
To Ports: 9100