I think there’s a bug on policy section. When i issue command ‘show policy route POSTROUTING’, a keyError notification shows up so i try to add the interface name where this policy have to be attached, i get commit failed error.
You can see details on the image i attached below.
Issue #2: Configuring an interface for policy routes that are using rule set names that are the same for existing chains POSTROUTING, PREROUTING, FORWARD is not working.
Remarks: Doing this in version 1.3 is also not allowed but maybe in 1.4 @n.fort has some workaround.
vyos@vyos# set policy route PREROUTING interface eth1
[edit]
vyos@vyos# commit
[ policy route PREROUTING ]
Failed to apply policy based routing
[[policy route PREROUTING]] failed
Commit failed
[edit]
vyos@vyos# set policy route POSTROUTING interface eth1
[edit]
vyos@vyos# commit
[ policy route PREROUTING ]
Failed to apply policy based routing
[[policy route PREROUTING]] failed
[ policy route POSTROUTING ]
Failed to apply policy based routing
[[policy route POSTROUTING]] failed
Commit failed
[edit]
vyos@vyos# set policy route FORWARD interface eth1
[edit]
vyos@vyos# commit
[ policy route FORWARD ]
Failed to apply policy based routing
[[policy route FORWARD]] failed
[ policy route POSTROUTING ]
Failed to apply policy based routing
[[policy route POSTROUTING]] failed
[ policy route PREROUTING ]
Failed to apply policy based routing
[[policy route PREROUTING]] failed
Commit failed
[edit]
vyos@vyos#
That’s ok. Just because set Mark wont work if i change policy route name so i set it in POSTROUTING chains. I need set mark to work better than show policy. If you can show me how to make it work in a new policy route name other than POSTROUTING, PREROUTING or FORWARD i will definitely try it. Thank you for the advice.
You are right, the mark is not working, no mark sign in the log. But why in tc qdisc the statistic is counted to each class as a sign that traffic goes into its class. Is it another bug or something?
In my thought that inbound traffic from lan is outbound to wan.
For 1.4 it is a separate bug, I created a bug report T5333
You shouldn’t rely on the name of policy if there you see some packets then it is a bug but not expected behavior.
Marking outgoing packets will be available in the next releases after firewall rewriting.