Manual WAN connect/disconnect



  • I must have used the wrong search words, can't believe that this question has not been asked before:

    How can I manually, via the command line, connect or disconnect (not: reconnect) the PPPoE etc. WAN connection?

    I found that

    ifconfig pppoe0 up
    
    ifconfig pppoe0 down
    

    should not be used, and for reconnect I found

    /usr/local/sbin/pfSctl -c 'interface reload wan' >/dev/null 2>&1 || exit 1
    

    or for ipv6

    /usr/local/sbin/ppp-ipv6 pppoe0 down ; pkill -xf '^.*dhcp6c.*pppoe0$' ; sleep 2 ; /usr/local/sbin/ppp-ipv6 pppoe0 up
    

    However, I'm not just looking for an option to reconnect WAN. The WAN connection I'm configuring is via 3G/4G, with online time costing money. So I am looking for a possibility to specifically connect/disconnect WAN if/when needed (via SSH).

    Thanks!


Log in to reply