V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
Levox
V2EX  ›  Linux

关于 ip rule + iptables 策略路由里面的 fwmark

  •  
  •   Levox · Feb 19, 2019 · 4198 views
    This topic created in 2632 days ago, the information mentioned may be changed or developed.
    向大家请教下:
    经常看到很多博文里面设置的 fwmark 不同,这样会不会存在冲突的可能?
    是否有个文件或者命令能够查看已经设置的 fwmark ?
    谢谢。
    5 replies    2019-04-10 18:31:00 +08:00
    julyclyde
        1
    julyclyde  
       Feb 20, 2019
    如果你混用多篇文章,就会有问题
    fanhed
        2
    fanhed  
       Feb 25, 2019
    显然会冲突,已经设置的 fwmark 的话,好像看不出,只能查连接跟踪。
    fwmark 貌似只能在 iptables 那里的规则设置,你查 iptables 就好了
    Levox
        3
    Levox  
    OP
       Apr 7, 2019
    @julyclyde
    @fanhed
    感谢回复,一直没收到提醒,今天刚看到

    目前我是通过查询和修改 /etc/iproute2/rt_tables{,.d/*.conf} 进行维护的。或许以后会有更好的方法吧。
    julyclyde
        4
    julyclyde  
       Apr 9, 2019
    @Levox 看路径还挺好的。不过建议你看一下这个配置文件是哪个服务负责加载的
    Levox
        5
    Levox  
    OP
       Apr 10, 2019
    @julyclyde 这个文件我 Google 上看到的都是手动修改的,好像没有哪个服务来管理。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2778 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 14:47 · PVG 22:47 · LAX 07:47 · JFK 10:47
    ♥ Do have faith in what you're doing.