问题原文
原帖链接 · Andris · CC BY-SA 3.0
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?
已采纳解答
原帖链接 · boris quiroz · CC BY-SA 4.0
I guess it should be possible, with something like this:
ufw deny from 127.0.0.1 to any port 1339
According to the ufw syntax, that's how you block a specific port on an specific IP.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
