Use OS to lock down Printer Port 9100 to specific IPs
I have a router with port forwarding turned on for access to a networked printer (port 9100) from external devices. I want to lock down access to this port to only come from various IP addresses (to avoid spammers from printing to this device). My router does not seem to have the capability to lock down access to this port from IP addresses, so I'm looking for a way for the Windows OS to only allow certain IPs to access the port. Is there a way to do this?
a) A standalone printer with its own Ethernet / WiFi interface and IP address
b) A printer attached to a Windows system that is available to the LAN as a shared printer
The solution would be different in each case.