Script to interact with dd-wrt remotely (configure VPN, etc)

Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload
Author Message
jgombos
DD-WRT User


Joined: 03 Nov 2007
Posts: 68

PostPosted: Wed Nov 25, 2009 21:09    Post subject: Script to interact with dd-wrt remotely (configure VPN, etc) Reply with quote
I posted an expect script in the wiki and created a new section to support this type of script. ( http://www.dd-wrt.com/wiki/index.php/Remote_Scripts ).

Feel free to expand on this script.

Here is the usage:
Code:

Syntax

   ddwrt.exp [ help | [-host <host>] [-pw <password>] <command> ]

Commands

   reboot

   login

   show [logs [-noexit] | vpncfg <vpn config file>]

      logs:   shows the most recent log file in /var/log/
      vpncfg: shows the VPN config file that would be sent by the start or boot vpn commands, without actually taking any action.

   start <vpn config file> [-noexit]

      Starts an openvpn session on the router using the configuration file provided.
      Paths in the configuration file are modified to suit the dd-wrt configuration,
      and all keys and other files needed are collected and pushed to the router in one aggregated command.
      The VPN session does not become a persistent configuration upon boot (see the boot command).

   stop [-noexit]

      Stops the VPN server.

   boot { wos <IP> <MAC> | clear | vpncfg <vpn config file> } [-noexit]

      wos:    Configures the SES button to send a wake-on-lan signal.  Setting is persistent.
               IP:  ip address of machine to wake.
               MAC: mac address of machine to wake.
      clear:  Removes the boot script.
      vpncfg: Configures the router to start a tunnel on boot.  Setting is persistent.

   radio [on | off] (default: on)

Environment variables

   DDWRT_HOST : specifies the dd-wrt host in the absense of the -host option
   DDWRT_PW   : specifies the dd-wrt login password in the absense of the -pw option.  If -pw is not used, and this variable is not set, then there will be a prompt for entry.
Sponsor
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Contributions Upload All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum