Hi! I got a vpn connection via wireguard. My goal is to default route SOME clients via wg: it works perfectly using routing rules, but i cant make it work using routing marks (for dynamic operations via address-lists). Is it real, and\or what i am doing wrong?
In both cases i can see in torch, that client pings to external ips are going through wg interface and where are replies recieved. But in case 2 that reply traffic are not sent to back to client.
You didnt show IP routes, or any firewall rules…
You didnt indicate where the user was going to get their internet, what is the wireguard tunnel connecting too??
Better to use different name for marking as its confusing otherwise!!!
Did you DISABLE FAST TRACK on the forward chain for example??
Not sure if packet to mark to route mark is necessary ( did you try skipping the whole packet part and bogon part )
No it does not, not even close. That example is for DNS queries routing and mixed in with a bunch of source address natting making it way too complicated to suss out for this particular very specific question..
THe Ops question is very clear and valid, how to make use of firewall address list in routing rules and specifically when it applies to Wireguard config.
The problem is clear, one cannot use firewall address lists FOR:
a. the destination address in an IP Route dst-address=???
b. source in the Routing Rule (options are src-address, dst-address, interface, routing mark - and NOT firewall address list)
The correct solution IMHO, that the OP is attempting is to mangle traffic from one IP, as a representative sample for a group of IPs (hence firewall address list approach), in order to identify that traffic in an associated wireguard Routing Rule (and an associated IP Route).
but I cant make it work using routing marks (for dynamic operations via address-lists)
That is exactly what I have done and that post is not about DNS marking I think you read the last replay only. cuz I already moved from the main object and then added the DNS marking after that.