CLI or JSON to turn WAN on / off ?

I have one ISP who can’t keep his system working for more than a minute, over and over, for 3 hours every night - badly overloaded. The Peplink health check is not suitable because it just keeps on/off/on/off, in sync with the busted ISP, but no traffic gets through.

Is there any CLI or JSON command to turn a WAN off / on, that I can script to avoid the above?

JSON APi should be possible:

CLI is quite useless…

Alternatively, you can assign a schedule to the WAN-connection:

After a week of observing and testing, this ISP is actually being very nasty. Its not overloaded, but deliberate blocking of new TCP SYN outbound packets, for x seconds, to limit traffic flow. Of course they hide it by allowing ICMP just fine, and only a TCP ping test will show the blocking. Fortunately the PepVPN is not blocked, nor existing open TCP streams. But the Peplink health check still kills the WAN, so the PepVPN keeps cycling from Wan 1 to 2, and no traffic flows during the transition.

I would think WAN health check detected the issue else you won’t know actually the ISP is doing such blocking for the TCP SYN like you mentioned (Default WAN health check for Ethernet WAN is using DNS method, suppose it should not failed). This is something weird here.

Seen you found the issue, do you contacted ISP report the issue ? I suppose this is not a expected behavior that ISP should do such thing right ?

Also you mentioned ping is ok , if you change WAN health check using ping, that should be good enough ? But again , like you said if ISP blocking new connection, it may cause other problem if someone is trying to connect.

This what Peplink typically detects, for all health test methods (ping, http, dns). Also shown is a TCP ping trace from pingplotter

Here is the interesting bit. A Windows / Mac ICMP ping, does not show any failures, indicating the ISP have some special rules to never fail ICMP. But the peplink ICMP health check fails - no response (packet sniffed the WAN). Why? What makes Peplink ICMP different to Win / Mac ICMP, and therefore detectable?

I have the health check set slow enough that it does not trip the failed connection.

But the PepVPN kept cycling from From WAN 1 to 2, because it recorded a single dropped packet in its stream (red triangle in the graph with 0.1 pack/sec loss rate). Well that’s too picky and annoying. Is there anyway to make the PepVPN a bit more fault tolerant. I side stepped this issue by removing the fall back WAN 2 from the PepVPN choices, and it now has to soldier on (and runs perfect).