美文网首页
Linux基于源IP的策略路由

Linux基于源IP的策略路由

作者: 袁先生的笔记 | 来源:发表于2022-08-29 18:44 被阅读0次
  • 在 /etc/iproute2/rt_tables 中添加自定义路由表

    100 my_table
    
  • 在自定义路由表中添加规则

    ip route add default dev eth1 table my_table
    
  • 添加路由策略,特定源IP使用自定义路由表

    ip rule add from 192.168.0.0/24 my_table
    

相关文章

网友评论

      本文标题:Linux基于源IP的策略路由

      本文链接:https://www.haomeiwen.com/subject/aqxrnrtx.html