LMLPHP后院

raspberry pi os close the port 25技术

maybe yes 发表于 2022-11-04 11:44

怎么关闭 Raspberry OS 的 25 端口呢?

record : how to close raspberry os port 25.

when is use netstat -tunlp | grep 25 to find the process name, but it don't show:

pi@raspberrypi:~ $ netstat -lptun | grep 25
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      -                   
tcp6       0      0 ::1:25                  :::*                    LISTEN      -                   

after a long time, i use sudo before, then i find it:

pi@raspberrypi:~ $ sudo netstat -lptun | grep 25
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      1006/exim4          
tcp6       0      0 ::1:25                  :::*                    LISTEN      1006/exim4

then, is use service exim4 stop to close the port 25.

2024-11-19 06:28:21 1731968901 0.004761