Themyth
V2EX  ›  macOS

怎么将 iptables 命令转成 macOS 上可以用的防火墙规则?

  •  
  •   Themyth · Aug 5, 2017 · 4354 views
    This topic created in 3281 days ago, the information mentioned may be changed or developed.
    譬如
    iptables -t mangle -A OUTPUT -p tcp --dport 22 -j TEE --gateway 192.168.1.1


    这条命令,在 mac 下怎么创建?

    谢谢
    3 replies    2017-08-05 23:31:22 +08:00
    liuminghao233
        1
    liuminghao233  
       Aug 5, 2017 via iPhone
    1.首先你自己要明白这段代码是干嘛用的
    2.
    bao3
        3
    bao3  
       Aug 5, 2017   ❤️ 1
    10.10 以前,使用 ipfw 转换,不难的。10.11 之后要用 pf 来写入。
    无论哪一个,这些都是 BSD 上的防火墙,你可以参考 FreeBSD handbook 中文版,里面有详细的介绍。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4134 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 00:59 · PVG 08:59 · LAX 17:59 · JFK 20:59
    ♥ Do have faith in what you're doing.