Hi,
How can I get the IP address of a OpenVPN interface using ubus?
I have tried ubus call network.interface.vpn status, but it does not show
me the IP address.
The following is how I configured my OpenVPN interface:
/etc/config/network
config interface 'vpn'
option ifname 'tun0'
option proto 'none'
option auto '1'
root@OpenWrt:~# ip addr show dev tun0
10: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel
state UNKNOWN group default qlen 100
link/none
inet 10.100.15.179 peer 10.100.15.180/32 scope global tun0
valid_lft forever preferred_lft forever
root@OpenWrt:~# ubus call network.interface.vpn status
{
"up": true,
"pending": false,
"available": true,
"autostart": true,
"uptime": 385,
"l3_device": "tun0",
"proto": "none",
"device": "tun0",
"metric": 0,
"delegation": true,
"ipv4-address": [
],
"ipv6-address": [
],
"ipv6-prefix": [
],
"ipv6-prefix-assignment": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
],
"inactive": {
"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
]
},
"data": {
}
}
Thanks in advance ...
--
Ronaldo Afonso
11 9 5252 0484
www.ronaldoafonso.com.br
_______________________________________________
openwrt-users mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-users