Skip to content

Instantly share code, notes, and snippets.

@wannadrunk
Last active September 14, 2023 14:32
Show Gist options
  • Save wannadrunk/c4e37baf5be8f98e1509bac2afa9f14c to your computer and use it in GitHub Desktop.
Save wannadrunk/c4e37baf5be8f98e1509bac2afa9f14c to your computer and use it in GitHub Desktop.

Revisions

  1. wannadrunk renamed this gist Sep 14, 2023. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. wannadrunk created this gist Sep 1, 2023.
    10 changes: 10 additions & 0 deletions reconnectnatip.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    :global reconnectCount;
    :local wanInterface "pppoe-out1";

    :while ( $"local-address" in 100.64.0.0/10 ) do={
    :log warning ("$wanInterface: Got Private IP ".$"local-address"." Reconnecting the interface...");
    /interface pppoe-client disable $wanInterface;
    :delay 10s;
    /interface pppoe-client enable $wanInterface;
    };
    :log info ("$wanInterface: Got IP ".$"local-address");