#!/bin/bash # This script reconnects the WAN Interface on m0n0wall box. # Can be used with cron to avoid disconnect during day times # initiated every 24 Hours by ISP. Run this script on any # Linux box with access to m0n0 managing interface. # # To run at 3 am every night add this to crontab # 0 3 * * * /home/root/reconnect # # Address of the m0n0wall box MONO="https://192.168.1.1:8080" # Username USER="admin" # Password PASSWORD="mono" wget -q --no-check-certificate --user=$USER --password=$PASSWORD \ --post-data 'submit=Disconnect' -O /dev/null \ $MONO/status_interfaces.php sleep 7 wget -q --no-check-certificate --user=$USER --password=$PASSWORD \ --post-data 'submit=Connect' -O /dev/null $MONO/status_interfaces.php