Joined: 07 Jun 2006 Posts: 1488 Location: the Netherlands
Posted: Mon Sep 07, 2009 8:08 Post subject:
A little search in the WIKI shows that when running the Mini version (prolly because your router doesn't support the STD or other versions) that you don't have JFFS because there's no more space on the flash chip.
No need to kick the topic up over and over again while a little search yourself could've given you the answer _________________ Firmware: DD-WRT v24-sp2 (latest available) mega
WRT320N
I'm having difficulties getting this to work... so the built-in sendmail (which is part of busybox) is throwing 255 whenever i try this on the command line and obviously there's no usage:
is there more to specifying the smtp server? does this even work without ssl anymore?
after uploading the utility in the zip file (via scp) it segfaulted when running so i can't try that one.
btw, "nvram get wan_ipaddr" gets me 192.168.1.64 which is clearly not what i'm looking for... this is ok as i can just parse the wget output of whatsmyip.us
Any help appreciated, i'm working on WRTS54GL with standard size dd-wrt...
Sorry for a noob question but I hav eonly jsut flashed my linksys with dd-wrt yesterday but also its down due to repair (well it has overheating issue I plan to solve tomorrow).
My question is what is INTERVAL=3600 representing? Checks every 1 hours or 1 minutes?
Cheers!
Sorry! Forget that. I just read the srript and saw it uses the sleep command which without a switch means 3600 is in seconds. Thus it checks every minute. My Bad.
Posted: Sun May 02, 2010 16:12 Post subject: Help with this script
hi all,
i'm trying to use this script in a WRT54G2 V1 Linksys. My firmware version is dd-wrt "micro plus ssh"
This router doesn't have any jffs or external card to use as a storage. So i will charge the files everytime the router starts. Before, i'm trying to do it from console executing commands.
What i'm doing is from ssh console, downloading "sendmail" and "wanipcheck.sh" using wget and saving them to to /tmp; later i make them executables (chmod +x ...)
Then, when trying to execute sendmail (./sendmail) i got "segmentation fault". And nothing happens.
If i execute wanipcheck.sh, apparently it works ok as i can see the process with "ps".
If there's another way of sending emails from this router i would love to hear it (¿netcat?, ¿/dev/tcp?, ¿expect?)
Hi,
my problem with this is that I get a "connect: Connection refused".
My mail server is mail.gmx.net; how can I add login / authentification information into your wanipcheck.sh?
edit:\> Maybe this isn't about SMTP auth, but because of something else...
I tried in the Command Shell of the dd-wrt webinterface this line
If I run this command, I get this output:
../jffs/usr/bin/sendmail: connect: Connection refused
I googled about this error but didn't come up with an exact reason nor solution
I set up my DDWRT router so that I can use it as an SSH server. I wanted to use it in conjuction with TOR + Tails for my laptop and Orbot and Orweb for my Droid X. I configured my Buffalo router to do this and I set a port forward on my DSL modem/router that the Buffalo is behind. I have a dynamic IP, so I pieced together a script in Auto Hotkey that would check whatismyip.org, save the IP as a file, and email it to me on a scheduled basis using System Scheduler v4.17. This setup works great for me.
In order for this to work I have to leave my computer running. I did a google search and found this thread. I figure the router running a script like my Auto Hotkey script would consume less power. Also, my Droid X doesnt play well with WPA on my DSL modem/router so I leave this router running with WEP all the time for my Droid anyway.
I have been reading through the forum for a few nights. I have made headway with some things but I need a little push either by direct answers or guidance to the proper tutorials.
+I already set up SSH on the Buffalo router so I was good to go there.
+I enabled jffs on the Buffalo and I have over 2 MB of space.
+I downloaded wanipcheck.sh and sendmail.
+I acquired WinSCP and I am now familiar with how to use it.
+I downloaded Notepad++ to edit wanipcheck.sh, I understand what the code is trying to accomplish, and I think I can configure it the way I need it.
Here is where I have hit a rut.
1. (This may well be the most retarded question of the evening) What file path do I put wanipcheck.sh and sendmail in?
2. Since my Buffalo is behind another router, will "nvram get wan_ipaddr" in wanipcheck.sh just give me the IP of my DSL modem/router as was mentioned by another poster?
If "nvram get wan_ipaddr" will only return my DSL modem/router's IP, I would like to figure out how to get wanipcheck.sh to get the public IP from whatismyip.org. I have read in this forum somwhere that v24 of DDWRT already does this if the INADYN setting is configured. Either way, how do I resolve this issue?
After I figure out these two points, I dont think I will have any problems executing the script and saving it to run on startup.
I know that I can use DYNDNS, but I do not want to. I have enjoyed learning something new by taking the harder path to travel.
Any answers will be much appreciated, and direction to the proper reading material will be just as much appreciated. _________________ Buffalo WHR HP G54
DD-WRT v24 RC-6 01/02/08 std
Hey,
I am having a few problems getting this script to run. I have a few basic questions if anybody is able/willing to answer them.
First off, when you edit the code variables is the following changed correctly:
MAIL_BINARY=/jffs/sendmail (is this directory correct since I have enabled jffs?)
MAIL_SERVER=smtp.isp.com (will sendmail send an email though smtp.gmail.com? if this older sendmail will not, is there a current version that will work with TLS and SASL?)
MAIL_TO=emailto@isp.com (self explanatory, my email)
MAIL_FROM=emailfrom@isp.com
MAIL_SUBJECT="Some subject for your email"
Now, when placing the script file (wanipcheck.sh) onto my router using WINSCP via drag and drop, where do I place it?
Do I create a directory in jffs called: jffs/etc/config and place it in there since it was not already created when I have enabled my jffs partition in my router???
Finally, when I have these two files in the correct location, should visiting the command section and enabling the startup command : ./wanipcheck.sh & start the script and keep it running. Also, is there a command I can type in to confirm the script is running?
I have done the above, but my router doesn’t seem to be starting the script it will not find the directory, any suggestions since I am new to placing running scripts on the router?
Since the Busybox has implemented sendmail, I use the sendmail command witch comes with the firmware.
I changed the file extension to .startup and put it into the folder /jffs/etc/config/wan_ipaddr.startup So it will execute at startup
Don't put it into /tmp/etc/config/wan_ipaddr.startup (with will also work). But this folder will be cleared after reboot.
I added an USB-Stick to the router and mounted it to /jffs
In the script you have to customize your settings.
Code:
# Here are the settings
INTERVAL=3600
LOG_FILE=/jffs/wan_ipaddr_list.txt
MAIL_SERVER=smtp.12345.org
MAIL_FROM=webmaster@12345.org
MAIL_USER=webmaster
MAIL_PASS=12345
MAIL_TO=friend@gmail.com
copy it into /jffs/etc/config/wan_ipaddr.startup and reboot the router.
Now the script should send an e-mail at startup with the actual WAN-IP-adress with timestamp. Like:
It also create an LOG_FILE at /jffs/wan_ipaddr_list.txt witch contains all previous WAN-IP-adresses.
The log file will be send as attachment on each e-mail.
The script will check every hour (3600 seconds) if the WAN-IP-adress has changed, and if it has changed it will send you the next status-mail.
To check if the script will work, you can execute it manually.
Log into the router by SSH connection and execute the script by "sh /jffs/etc/config/wan_ipaddr.startup".
You will see the SMTP response of your ISP. To stop the script you have to press ctrl + c.
To check if the script is running after a reboot type "ps".
If you find something like
/bin/sh -c /jffs/etc/config/wan_ipaddr.startup
or
{wan_ipaddr.star} /bin/sh /jffs/etc/config/wan_ipadd
the script is successful running.
Download the script HERE.
(You have to be logged in to the forum)