[7.866][NOTABUG][CLOSED] policy route works even it is disable

Hello Friends !

i create policy route (wordless thanks to billybob)
and  test it it work fine for me and later i tryed to disable it ,still it work (i am able to acess ssh using policy route)later i delete that route then i was not able to acess ssh ,to test further i create new policy route and did not enable it still i was able to acess it for all this process i need not need to restart the system but i restart the linux server and asg many times 


thanks
  • Hello UTM_Kid,

    can you describe the scenario that you have more precisely.
    Helpful are your exact settings from the pbr and a step by step howto to reproduce the issue.

    regards,

    Steffen
  • Hello Steffen,
    if u dont mind should i show u on team viewer ?

    thanks
  • please simply write it down here in the forum, so that others can participate. we can't put teamviewer sessions up here...
  • ok !

    u can u please try to create a rule and dont enable it and simply try to execute what u r define in rule or ,create a rule enable it and then disable it and try to acess what u have create in rule 

    thx
  • Cant verify that.

    Whats the output of "iptables -L POLICY_ROUTING_PRE -v -n -t mangle" and "iptables -L POLICY_ROUTING_OUT -v -n -t mangle" before enabling a rule and after enabling a rule?
  • pls check 

     iptables -L POLICY_ROUTING_OUT -v -n -t mangle
    Chain POLICY_ROUTING_OUT (1 references)
     pkts bytes target     prot opt in     out     source               destination                                                                              
    acenn:/home/login # iptables -L POLICY_ROUTING_PRE -v -n -t mangle
    Chain POLICY_ROUTING_PRE (1 references)
     pkts bytes target     prot opt in     out     source               destination                                                                              
    acenn:/home/login # rule was disable still i was able to connect now i will enab
    bash: rule: command not found
    acenn:/home/login # iptables -L POLICY_ROUTING_PRE -v -n -t mangle                                                                                           Chain POLICY_ROUTING_PRE (1 references)
     pkts bytes target     prot opt in     out     source               destination                                                                              
        0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0                                                                                        mark match !0x0
        0     0 MARK       tcp  --  eth0   *       192.168.2.0/24       192.168.1.20                                                                             0       tcp spts:1:65535 dpt:22 mark match 0x0 MARK xset 0x1000000/0xffffffff
    acenn:/home/login # iptables -L POLICY_ROUTING_OUT -v -n -t mangle                                                                                           Chain POLICY_ROUTING_OUT (1 references)
     pkts bytes target     prot opt in     out     source               destination                                                                              
        0     0 ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0                                                                                        mark match !0x0
        0     0 MARK       tcp  --  eth0   *       192.168.2.0/24       192.168.1.20                                                                             0       tcp spts:1:65535 dpt:22 mark match 0x0 MARK xset 0x1000000/0xffffffff
    acenn:/home/login #



    thx

    update::i think my plocy rule is wrong
  • hi kbr ,

    can u please check this and please let me know whether my policy route is correct or no if possible can u please send me 1 sample of static and policy route with some words 

    thanks
  • Policy routes has nothing to do with allowing/denying packets.

    You need policy routes, if you have an REDUNDANT connection,
    e.g. host1 is accessible via eth0 AND eth1.
    So normally all packets will be routerd over eth0 to host1.

    Then you can insert a policy route for SSH traffic to host1 over eth1,
    so SSH is routed over eth1 and all other packets are routed over eth0.