Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
biaoliruyi
V2EX  ›  Linux

如何记录 Linux 端口历史占用日志

  •  
  •   biaoliruyi · Jul 24, 2018 · 5104 views
    This topic created in 3032 days ago, the information mentioned may be changed or developed.

    想记录某些关键端口的历史占用情况,但是 linux 系统日志好像没有。 有什么工具能满足需求推荐下。

    6 replies  •  2018-07-24 16:12:04 +08:00
    d0m2o08
    d0m2o08
    Jul 24, 2018
    1
    自己造一个扔到 corn 里
    d0m2o08
    d0m2o08
    Jul 24, 2018
    2
    @d0m2o08 cron 这操蛋的键盘
    biaoliruyi
    biaoliruyi
    OP
    Jul 24, 2018
    3
    @d0m2o08 shell 不是强项(运维人跑了开发顶上) 看了下 cron 最小精度是分钟不太能满足我的需求
    reus
    reus
    Jul 24, 2018
    4
    iptables -I INPUT -p tcp --dport some_port -j LOG
    reus
    reus
    Jul 24, 2018
    5
    google "linux log port state"
    BOYPT
    BOYPT
    Jul 24, 2018
    6
    写个 while true 的脚本,把 ss 的输出 dump 到文件
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4637 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 06:29 · PVG 14:29 · LAX 22:29 · JFK 01:29
    ♥ Do have faith in what you're doing.