What are the security risks in adding a feature to an application which allows users to test for connectivity from a server to a printer?
I'm planning to add a feature to my application to allow users to click a button which will test whether the server can connect to a printer. The button won't allow the user to send any data, but they will be able to specify the IP address and port of the printer to be connected to.
I'm concerned about the risks that a malicious user might be able to use this feature to carry out network scanning from the server's perspective.
What would be some good controls to add to this kind of facility to minimize any security risks? For example, perhaps I could limit it to a specific port or ports which are used for printer configuration or limit the function to only be usable by a privileged user.