#!/bin/sh # Update the factory settings of OpenWrt to a known-good configuration. # You should make a copy of this script, customize it to your needs, # then use the "To run this script" procedure (below). # # This script is designed to configure all the settings needed to # set up your router after an initial "factory" firmware flash. # # There are sections below to configure many aspects of your router. # All the sections are commented out. There are sections for: # # - Update the root password # - Set up the eth0/WAN interface to connect to via PPPoE # - Update the software packages # - Set the time zone # - Enable SNMP for traffic monitoring and measurements # - Enable mDNS/ZeroConf on the br-lan (LAN) interface # - Set the SQM (Smart Queue Management) parameters # # ***** To run this script ***** # # Flash the router with factory firmware. Then *telnet* in and execute these statements. # You should do this over a wired connection because some of these changes # can reset the wireless network. # # telnet 192.168.1.1 # cd /tmp # cat > config.sh # [paste in the contents of this file, then hit ^D] # sh config.sh # Presto! (You should reboot the router when this completes.) # === Update root password ===================== # Update the root password. Supply new password for NEWPASSWD and # uncomment six lines. # # echo 'Updating root password' # NEWPASSWD=your-new-root-password # passwd <