<div dir="ltr">  Hi all,<div><br></div><div>  Is it possible to get VPN interface IP address using ubus command line "call"?</div><div><br></div><div>  Like I do using my WAN interface, as:</div><div><br></div><div><div>root@oi-eng-03:~# ubus call network.interface.wan status</div><div>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>"up": true,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>"pending": false,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>"available": true,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>"autostart": true,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>"dynamic": false,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">    </span>"uptime": 3203,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>"l3_device": "eth1",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>"proto": "dhcp",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>"device": "eth1",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>"updated": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>"addresses",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">         </span>"routes",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>"data"</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"metric": 0,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>"delegation": true,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">  </span>"ipv4-address": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>"address": "192.168.11.106",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                       </span>"mask": 24</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"ipv6-address": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"ipv6-prefix": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"ipv6-prefix-assignment": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">          </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"route": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">           </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>"target": "192.168.11.1",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>"mask": 32,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                  </span>"nexthop": "0.0.0.0",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>"source": "192.168.11.106\/32"</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>},</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>{</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>"target": "0.0.0.0",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                       </span>"mask": 0,</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                   </span>"nexthop": "192.168.11.1",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                 </span>"source": "192.168.11.106\/32"</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>}</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"dns-server": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"dns-search": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">              </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">       </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"inactive": {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                </span>"ipv4-address": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>"ipv6-address": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                    </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>"route": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                   </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>"dns-server": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span>"192.168.11.1"</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>],</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">             </span>"dns-search": [</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">                      </span></div><div><span class="gmail-Apple-tab-span" style="white-space:pre">               </span>]</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">      </span>},</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">     </span>"data": {</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">            </span>"leasetime": 86400</div><div><span class="gmail-Apple-tab-span" style="white-space:pre">   </span>}</div><div>}</div><div><br></div><div><br></div><div>   That's how I configured my VPN interface:</div><div><br></div><div><div>root@oi-eng-03:~# uci show network.vpn</div><div>network.vpn=interface</div><div>network.vpn.ifname='tun0'</div><div>network.vpn.proto='none'</div></div><div><br></div><div>   So it get its IP address dynamically.</div><div><br></div><div>   It seems that I need to do some bash netifd script programming?</div><div><br></div><div>   Thanks in advance ...</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Ronaldo Afonso<br><div>11 9 5252 0484</div><div><a href="http://www.ronaldoafonso.com.br" target="_blank">www.ronaldoafonso.com.br</a></div></div></div>
</div></div>