Setting up stunnel on dd-wrt

SIMKO

Member
I had the Elk M1 giving me daily updates at 7:00AM to let me know that it was working.

Then my ISP sent me a new modem and I got that set-up and it continued to give me updates for about a week when all of a sudden it stopped. I know it doesn't make sense, and if nothing changed then it should still be working. I've tried everything from double checking the email configuration, rebooting everything, send, receive, changing email ports, entering IP address instead of DNS address, etc.

I have an old Linksys WRT54GL that I flashed with DD-WRT and I am hoping that I can install Stunnel on it and get past this issue with the email for the ELK.

I searched the forums, the articles, and the downloads, but haven't found anything on doing this, does anyone have any input on setting this up?

I just want the ELK panel to email/text me under a few conditions, but this is turning out to be a huge undertaking :(
 
Get a free non ssl email account at

Lavabit. Com

Then under smtp settings, enter the ip address (non smtp) and it should send fine.

Your isp may be implementing ssl on their server, that's why it no longer sends.

Lavabit email will work, at least it does for me with charter isp.

Regarding stunnel, please keep this thread updated... As I will like to learn stunnel too
 
I found this... Stunnel is new for me, so perhaps you can decipher the code.

I have tomato on my router, so perhaps you can help me with stunnel as well. It will be nice to smtp from gmail and not rely on lavabit

http://cocoontech.com/forums/topic/14220-elk-m1-send-email-through-gmail-or-comcast/
 
Unless there is another use I'm not aware of, stunnel secures connections. It does not wrap your email with SSL.
 
I don't have access to my router at the moment, but it appears to be simply, download putty, telnet or ssh into the router,

Then ipkg install stunnel

Then edit the stunnel. Conf file

---anyone know where the stunnel. Conf file lies? Which folder?
 
I telnet into my tomato router,

I type in ipkg install stunnel

I get this error:

root@unknown:/# ipkg install stunnel
-sh: ipkg: not found


Anyone know whats wrong?

Do I have to wget the package first??

please help
 
After doing a few hours of reading, I think I may be trying to do something above my pay grade.. LOL

All I want is for the ELK to mail me once a day at 7AM and if any alarm goes off. I already had it set-up with lavabit, but it doesn't work anymore (for some unknown reason)?

I don't want to run a separate server (that was one of the reasons why I bought an ELK). I was hoping to be able to figure out how to install stunnel on the router, but it doesn't appear to be as easy as I thought. I figured that if I could get it to work, then being able to use Gmail would be a bonus.

Definitely interested if any of you fellow cocooners have any input on how to do this.
 
It looks like part of the issue is that you need some file system space to do this, and the WRT54GL doesnt have nearly enough.

Options are a new router with a USB port so you can use "external" storage, or using a network share on a machine thats presumably up and running at all times.

I know you didnt want to add another server, so it probably precludes option 2. I too have a WRT54GL and would be interested in seeing if stunnel is a better alternative than just using an "open" email service. Problem is Ive never been impressed with any newer routers enough to replace my trusty WRT.

I *will* be using an HA server, so I might be able to set it up there to verify it works like we want it.
 
So I have a tomato router with usb ports.

Formatted the usb stick with ext2, mounted the drive, set drive to boot with /opt mount --installed optware , then ipkg install stunnel

Got the stunnel, edited the stunnel. config.

Saved the config. Reboot router

I opened up outlook express and did a dummy test as 102.0.0.0.1 (my server) as smtp. But it errors out. Does not connect to gmail smtp

Do I need to forward or open and ports on the router?
 
Yep. I was just looking through my setup on DDWRT. It's been a while, but basically the same process, install optware, install stunnel package, then edit the stunnel config. I didn't need to open any ports. Obviously stunnel will need to be running, you'll need to edit your startup to launch it (/opt/sbin/stunnel&), but for a test you could just launch it via SSH just don't close your session. I bought a router especially to run DDWRT with plenty of flash and memory, (ASUS RTN16). I upgraded from a WRT54G.

For a good test, try to telnet to the internal port and you should be greeted with an SMTP prompt from the SMTP server.

The relevant part of my config is: (I am not using GMAIL)
Code:
; Use it for client mode
client = yes
 
[smtp]
accept=5999
connect=<server>:465
 
OP did not mention what provider they are trying to send email from (or I just didn't see it...). I have tried to use stunnel with yahoo on a regular PC distribution. Config should be the same as dd-wrt so you may want to get it working on a PC first. I was trying to get command line email working for status emails and such from misterhouse. People seem to have had better luck with gmail than yahoo. Part of the problem is that the settings have changed over time and many of the suggested settings are out of date.
 
Yep. I was just looking through my setup on DDWRT. It's been a while, but basically the same process, install optware, install stunnel package, then edit the stunnel config. I didn't need to open any ports. Obviously stunnel will need to be running, you'll need to edit your startup to launch it (/opt/sbin/stunnel&), but for a test you could just launch it via SSH just don't close your session. I bought a router especially to run DDWRT with plenty of flash and memory, (ASUS RTN16). I upgraded from a WRT54G.

For a good test, try to telnet to the internal port and you should be greeted with an SMTP prompt from the SMTP server.

The relevant part of my config is: (I am not using GMAIL)
Code:
; Use it for client mode
client = yes
 
[smtp]
accept=5999
connect=:465

Wuench, can you please post the init. D command string to auto start stunnel during boot?

Thanks
 
On DDWRT you just need to paste the following in the Startup section of the Administration...Commands tab in the GUI:
/opt/sbin/stunnel&

I don't have anything in /etc/init.d, I don't know where ddwrt puts it....
 
Back
Top