FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
448 views 0 comments
by anonymous
Hello support,

RUTX11 Router

I'm currently trying to do some script to control the OpenVPN state using ssh I know how to set openvpn on/off via ssh, but I wonder to know the state of openVpn via command line also. How should I do to know if OpenVPN is online or offline via ssh command ?

Thank you

1 Answer

0 votes
by anonymous

Hello, 

Regarding this question of yours. The best thing to do to know if the tunnel is established properly you can run this command: "route -n"

-------------------------------------------------------------------------------------------------------------
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

0.0.0.0         10.10.30.254    0.0.0.0         UG    0      0        0 eth1
10.10.10.1      10.10.10.5      255.255.255.255 UGH   0      0        0 tun_c_Test
10.10.10.5      0.0.0.0         255.255.255.255 UH    0      0        0 tun_c_Test

10.10.30.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
192.168.1.0     10.10.10.5      255.255.255.0   UG    0      0        0 tun_c_Test
192.168.150.0   0.0.0.0         255.255.255.0   U     0      0        0 br-lan
192.168.200.0   0.0.0.0         255.255.255.0   U     3      0        0 br-Jerome
--------------------------------------------------------------------------------------------------------

If you see the OpenVPN Virtual IP in the routing table tunnel is up :) you can try pinging the virtual IP on the other end. 

Regards,
Mellow