Hi, how can I extract a list of interfaces in the wan zone?
Assume I have this in the config:
config zone
option name 'wan'
option input 'REJECT'
option output 'ACCEPT'
option forward 'REJECT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
list network 'test'
So I basically want to get a list consisting of "wan wan6 test".
So far I've come up with this:
ubus call uci get '{ "config": "firewall", "type": "zone" }'
Which produces this result:
Summary
{
"values": {
"cfg02dc81": {
".anonymous": true,
".type": "zone",
".name": "cfg02dc81",
".index": 1,
"name": "lan",
"network": [
"lan"
],
"input": "ACCEPT",
"output": "ACCEPT",
"forward": "ACCEPT"
},
"cfg03dc81": {
".anonymous": true,
".type": "zone",
".name": "cfg03dc81",
".index": 2,
"name": "wan",
"input": "REJECT",
"output": "ACCEPT",
"forward": "REJECT",
"masq": "1",
"mtu_fix": "1",
"network": [
"wan",
"wan6",
"test"
]
}
}
}
Now how to narrow it down to specifically the wan zone, and then how to get the interfaces out of it? I suppose something like jsonfilter should do it, but maybe I can query for the specific info directly? If I need to use jsonfilter then maybe someone can throw the exact command at me? Probably noob questions, sorry about that