Hi Adze,...
thank you very much for your incredible work on mwan3
I have failover connection on 2 wan by pppoe and 1 by usb gsm and also have 1 tunnel for openvpn
in any case I want to failover for the openvpn because 1 of my pppoe only reach for semi-private ip and not use for internet, but it have backup to for public connection wan and by usb gsm too.
I put 'option keepalive' on my openvpn.cnf and it's take 2-6 minutes for restarting openvpn service, and for my company that's take too much time.
I want trigger script which ifup/ifdown my pppoe then it will restart openvpn service, and I think it will more efficient,...but I don't know how? because I just know that mwan3 also have related to hotplug.d
this is my output from diagnostic mwan3
Software versions :
OpenWrt - OpenWrt Barrier Breaker 14.07
LuCI - 0.12+svn-r10530
mwan3 - 1.5-10
mwan3-luci - 1.3-5
Output of "cat /etc/config/mwan3" :
config interface 'cis'
option enabled '1'
list track_ip '210.23.66.130'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '5'
config interface 'speedy'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '210.23.66.130'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '5'
config interface 'gsm'
option enabled '1'
list track_ip '8.8.8.8'
list track_ip '210.23.66.130'
option count '1'
option timeout '2'
option interval '5'
option down '3'
option up '5'
config member 'speedy_m1_w3'
option interface 'speedy'
option metric '1'
option weight '3'
config member 'speedy_m2_w3'
option interface 'speedy'
option metric '2'
option weight '3'
config member 'speedy_m3_w3'
option interface 'speedy'
option metric '3'
option weight '3'
config member 'speedy_m4_w3'
option interface 'speedy'
option metric '4'
option weight '3'
config member 'gsm_m1_w3'
option interface 'gsm'
option metric '1'
option weight '3'
config member 'gsm_m2_w3'
option interface 'gsm'
option metric '2'
option weight '3'
config member 'gsm_m3_w3'
option interface 'gsm'
option metric '3'
option weight '3'
config member 'gsm_m4_w3'
option interface 'wan2'
option metric '4'
option weight '3'
config member 'cis_m1_w3'
option interface 'cis'
option metric '1'
option weight '3'
config member 'cis_m2_w3'
option interface 'cis'
option metric '2'
option weight '3'
config policy 'speedy_only'
list use_member 'speedy_m1_w3'
config policy 'gsm_only'
list use_member 'gsm_m1_w3'
config policy 'speedy_gsm'
list use_member 'speedy_m1_w3'
list use_member 'gsm_m2_w3'
config policy 'gsm_speedy'
list use_member 'speedy_m2_w3'
list use_member 'gsm_m1_w3'
config policy 'cis_speedy_gsm'
list use_member 'cis_m1_w3'
list use_member 'speedy_m2_w3'
list use_member 'gsm_m3_w3'
config policy 'cis_gsm_speedy'
list use_member 'cis_m1_w3'
list use_member 'gsm_m2_w3'
list use_member 'speedy_m3_w3'
config rule 'vpn_cis_first'
option proto 'udp'
option use_policy 'cis_speedy_gsm'
option dest_port '7068'
option dest_ip '210.23.66.130'
config rule 'speedy_gsm_fail'
option proto 'all'
option use_policy 'speedy_gsm'
Output of "cat /etc/config/network" :
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdd8:0249:99c8::/48'
config interface 'lan'
option ifname 'eth0.1'
option force_link '1'
option type 'bridge'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.176.99.254'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option ports '1 2 3 4 5t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '0 5t'
config interface 'gsm'
option proto '3g'
option device '/dev/ttyUSB2'
option service 'umts'
option apn 'internet'
option metric '20'
config interface 'cis'
option proto 'pppoe'
option ifname 'eth0.2'
USERNAME HIDDEN
PASSWORD HIDDEN
option metric '5'
config interface 'speedy'
option proto 'pppoe'
option ifname 'eth0.2'
option metric '10'
USERNAME HIDDEN
PASSWORD HIDDEN
config interface 'ussivpn'
option proto 'none'
option ifname 'tun0'
Output of "ifconfig" :
br-lan Link encap:Ethernet HWaddr 64:70:02:8E:E2:DE
inet addr:192.176.99.254 Bcast:192.176.99.255 Mask:255.255.255.0
inet6 addr: fdd8:249:99c8::1/60 Scope:Global
inet6 addr: fe80::6670:2ff:fe8e:e2de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:468 errors:0 dropped:0 overruns:0 frame:0
TX packets:529 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:56517 (55.1 KiB) TX bytes:218065 (212.9 KiB)
eth0 Link encap:Ethernet HWaddr 64:70:02:8E:E2:DE
inet6 addr: fe80::6670:2ff:fe8e:e2de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4696 errors:0 dropped:0 overruns:2383 frame:0
TX packets:4796 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:378835 (369.9 KiB) TX bytes:266414 (260.1 KiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr 64:70:02:8E:E2:DE
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:117 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:11408 (11.1 KiB)
eth0.2 Link encap:Ethernet HWaddr 64:70:02:8E:E2:DE
inet6 addr: fe80::6670:2ff:fe8e:e2de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:4695 errors:0 dropped:0 overruns:0 frame:0
TX packets:4674 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:294261 (287.3 KiB) TX bytes:234351 (228.8 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:96 (96.0 B) TX bytes:96 (96.0 B)
pppoe-cis Link encap:Point-to-Point Protocol
inet addr:210.23.69.151 P-t-P:210.23.69.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:449 errors:0 dropped:0 overruns:0 frame:0
TX packets:493 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:26058 (25.4 KiB) TX bytes:28991 (28.3 KiB)
pppoe-speedy Link encap:Point-to-Point Protocol
inet addr:36.80.33.138 P-t-P:36.80.32.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:1052 errors:0 dropped:0 overruns:0 frame:0
TX packets:1075 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:103903 (101.4 KiB) TX bytes:77200 (75.3 KiB)
tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:129.70.77.193 P-t-P:129.70.77.194 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr 64:70:02:8E:E2:DE
inet6 addr: fe80::6670:2ff:fe8e:e2de/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:468 errors:0 dropped:0 overruns:0 frame:0
TX packets:545 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63095 (61.6 KiB) TX bytes:229629 (224.2 KiB)
Output of "route -n" :
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 210.23.69.1 0.0.0.0 UG 5 0 0 pppoe-cis
0.0.0.0 36.80.32.1 0.0.0.0 UG 10 0 0 pppoe-speedy
36.80.32.1 0.0.0.0 255.255.255.255 UH 0 0 0 pppoe-speedy
129.70.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
129.70.77.194 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
192.176.99.0 0.0.0.0 255.255.255.0 U 0 0 0 br-lan
193.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
194.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
195.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
196.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
197.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
198.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
199.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
200.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
201.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
202.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
203.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
204.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
205.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
206.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
207.176.77.0 129.70.77.194 255.255.255.0 UG 0 0 0 tun0
210.23.69.1 0.0.0.0 255.255.255.255 UH 0 0 0 pppoe-cis
basically I want ifup or ifdown pppoe-cis then /etc/init.d/openvpn restart
but I don't know how and where put that script
pardon for my bad english, I'm from Indonesia by the way
Thanks Adze