I have a service running on port 1339. Is it possible to deny requests from localhost to this port? Currently I have an ufw rule to allow requests from a specified IP but localhost can access the port as well. I don't want users logged in to the server access the url with curl or wget, the port should only be accessible from the specified IP. Is this possible?
I guess it should be possible, with something like this:
According to ufw syntax, that's how you block an specific port on an specific ip.