• 请不要在回答技术问题时复制粘贴 AI 生成的内容
nullo
V2EX  ›  程序员

iptables 绑定 mac 问题

  •  
  •   nullo · Jun 25, 2024 · 1753 views
    This topic created in 711 days ago, the information mentioned may be changed or developed.
    我在防火墙上做了端口映射,在 linux wireguard vpn 上做了 iptables 来限制连接进来的设备,为啥限制了 mac 地址,但是没有命中呢 ? 获取不到 mac 地址呢 ?和防火墙有关系嘛
    4 replies    2024-06-26 00:25:57 +08:00
    NikoXu
        1
    NikoXu  
       Jun 25, 2024
    iptables 不就是防火墙吗 ?
    gesse
        2
    gesse  
       Jun 25, 2024
    mac 地址只工作在同一个局域网里
    julyclyde
        3
    julyclyde  
       Jun 25, 2024
    首先你要明白 mac 只在广播域内生效
    其次再说防火墙的事
    qbqbqbqb
        4
    qbqbqbqb  
       Jun 26, 2024
    首先 wireguard 是纯三层 vpn ,没有虚拟二层接口,里面接入的客户端根本就没 mac 地址

    mac 地址是二层的,通俗理解就是跟着网卡且只在同一个局域网生效,哪怕是 openvpn, zerotier 这种有虚拟二层的 vpn ,接入进来的也是虚拟网卡的 mac 地址。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   922 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 42ms · UTC 22:39 · PVG 06:39 · LAX 15:39 · JFK 18:39
    ♥ Do have faith in what you're doing.