HP Network Printer


How would I get my printer seen with firewall up? Is there a specific service to allow?

For configuration purposes, CUPS uses the SNMP protocol, and recent versions are also use DNS-SD (via cups-browsed) for printer discovery.

From man cups.snmp

The CUPS SNMP backend provides legacy discovery and identification of network
printers using SNMPv1. When used for discovery through the scheduler, the
backend will list all printers that respond to a broadcast SNMPv1 query with
the “public” community name. Additional queries are then sent to printers that
respond in order to determine the correct device URI, make and model, and
other information needed for printing.

   In the first form, the SNMP backend is run directly by the user to look up the
   device URI and other information when you have an IP address or hostname. This
   can be used for programs that need to configure print queues  where  the  user
   has supplied an address but nothing else.
   In  the  second  form,  the SNMP backend is run indirectly using the lpinfo(8)
   command. The output provides all printers detected via SNMP on the  configured
   broadcast addresses. Note: no broadcast addresses are configured by default.

Ports 161 and 162 are used for SNMP communication by default.

Since your title refers to an HP printer, you may be using HPLIP? If so, the following advice is applicable

Make sure that port 161 (udp and tcp), port 162 (udp and tcp) and port 9100 (udp and tcp) are open through your firewall. If these are not open then HPLIP will not function.


This may also apply


Here my firewall rulez, still no dice.

Are you using ‘hp-setup’ to configure it? Do you know the IP address of your printer? Can you ping it successfully? As per the troubleshooting guide, is anything reported by the snmpwalk command?

snmpwalk -Os -c public -v 1 <printer IP address>

For example, I get

# snmpwalk -Os -c public -v 1
enterprises. = STRING: "MFG:Brother;CMD:PJL,PCL,PCLXL;MDL:HL-2150N series;CLS:PRINTER;"

IMO this might be made more difficult than it should be.

  1. Install hplip. As described snmp is used to discover devices and the reason why snmp is used is because it’s simplistic and should work automatically and immediately.

  2. Fire up hplip. You should see the printer immediately. If you can’t, then that’s where you need to start… if necessary drop firewalls to determine if it’s a firewall problem. If your printer is a network printer, then firewalls shouldn’t be an issue.

In fact, I don’t see that you’ve described your printer setup at all.
You should describe

  • The printer model
  • How the printer is deployed… a network printer with its own IP address? Shared? Otherwise deployed?
  • If the printer is not a network printer, is the Host it’s attached to configured as a Printer Server(typically one way to identify is if a printer queue exists on the Host)?

In any case, your Printer has to be recognizable on your Network before anything else is possible.

  1. If recognized, then select it in hplip and follow the instructions.


Managed to add printer with HPLIP via advanced, manual discovery, IP address & root password. Only thing is there is no provision to set static with my ISP supplied router.

On Wed 10 Feb 2016 02:06:01 AM CST, fleamour wrote:

Managed to add printer with HPLIP via advanced, manual discovery, IP
address & root password. Only thing is there is no provision to set
static with my ISP supplied router.

Just configure the router dhcp range to a few addresses, then
use /etc/hosts file and configure the printer to a static ip address.

eg: hp-laser.yourlocaldomain hp-laser

Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 SP1|GNOME 3.10.4|3.12.51-60.25-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Should not be an issue, your ISP should provide only DHCP.

  1. Either based on configuration or determined by the address given one of your existing clients, identify the NetworkID of your network, which is the numbers or octets covered by your network mask.

  2. Determine the address range issued by the DHCP server. If you don’t have access to your DHCP Server to read its configuration, you can estimate by inspecting the addresses already issued and used by your clients. All DHCP servers issue addresses starting with the beginning address in the network address range (scope).

If the addresses of your first few DHCP client machines are very low, then note that, eg If this is the case, then you can fairly safely statically assign very high addresses, like Even if it’s within the DHCP scope (assigned address range), it’s still very unlikely 253 devices would be connected to your network before leases expire.

If the DHCP assigned machine addresses are relatively high… for example, then that means that addresses will be assigned only higher than that. This means that excluding a few addresses which might be used for things like the default gateway, you’d likely be able to assign static address starting with which would not conflict with DHCP clients.