V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Themyth
V2EX  ›  macOS

PF 防火墙规则....freebsd 怎么转过来呢

  •  
  •   Themyth · 2019-04-11 17:00:41 +08:00 · 1418 次点击
    这是一个创建于 1839 天前的主题,其中的信息可能已经有所发展或是发生改变。
    譬如这条命令
    pass out on em0 inet proto tcp to port 22 divert-packet port 2222

    应该怎么转换称 mac os 下的 pf 规则呢
    4 条回复    2019-04-12 09:43:12 +08:00
    towser
        1
    towser  
       2019-04-11 17:20:48 +08:00
    不知道,宇宝。
    bao3
        2
    bao3  
       2019-04-12 00:07:03 +08:00 via iPhone
    规则不是一样的吗?
    Themyth
        3
    Themyth  
    OP
       2019-04-12 09:42:35 +08:00
    @bao3 我用 pfctl -vnf 测试 提示错误 但是不提示什么错误 但是删除 divert-packet port 2222 这个 和 前面的 out 然后在最前面加上 rdr 就不提示错误了,可是我不知道 Mac osx 下 什么命令来替代 divert-packet port 2222 郁闷啊
    Themyth
        4
    Themyth  
    OP
       2019-04-12 09:43:12 +08:00
    @towser 不知道就帮我问问啊
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3174 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 14:24 · PVG 22:24 · LAX 07:24 · JFK 10:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.