Re: Lightweight policy-based routing

2020-12-06 Thread Baptiste Jonglez
On 04-12-20, Philip Prindeville wrote: > But I’m trying: > > config rule > option src '192.168.3.6' > option lookup 200 > > Per the cheatsheet and it’s resulting in: > > root@OpenWrt2:~# ip rule ls > 0:from all lookup local > 1:from all lookup 200 > 32766:from all

Re: Lightweight policy-based routing

2020-12-04 Thread Philip Prindeville
But I’m trying: config rule option src '192.168.3.6' option lookup 200 Per the cheatsheet and it’s resulting in: root@OpenWrt2:~# ip rule ls 0: from all lookup local 1: from all lookup 200 32766: from all lookup main 32767: from all lookup default i.e. the ’src’ is

Re: Lightweight policy-based routing

2020-12-04 Thread Jo-Philipp Wich
Hi Philip, ip rules are possible in uci, but not sure if all the bits you require are covered: https://openwrt.org/docs/guide-user/network/ucicheatsheet#ip_rules_for_both_rule_and_rule6 `config route` sections allow specifying `option table` as well to stage the routes in the non-main rttable.

Lightweight policy-based routing

2020-12-04 Thread Philip Prindeville
Hi. I’m currently manually doing the following in a script but was wondering if there was an easy way to do this in UCI, such as in /etc/config/network: #!/bin/sh INTF=xfrm0 STB=192.168.3.6/24 TABLE=stb GW2=192.168.1.252 NETS="151.101.0.0/16" eval `ipcalc -n -p $STB` if ! grep -q "^200