Jump to content


Photo
- - - - -

Setting up stunnel on dd-wrt


  • Please log in to reply
45 replies to this topic

#1 SIMKO

SIMKO

    Cocooner

  • Registered
  • PipPip
  • 57 posts
  • Experience:novice
  • Hardware:Elk M1
  • Tech:UPB

Posted 14 May 2012 - 11:41 AM

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 :(

#2 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 14 May 2012 - 12:39 PM

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

#3 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 14 May 2012 - 12:42 PM

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.co...ail-or-comcast/

#4 video321

video321

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 774 posts
  • Location:NJ
  • Hardware:Elk M1, Mi Casa Verde Vera
  • Tech:Z-Wave
  • Audio:Custom
  • Video:Custom
  • CCTV:analog, dvr
  • Phone:Ooma

Posted 14 May 2012 - 12:43 PM

Unless there is another use I'm not aware of, stunnel secures connections. It does not wrap your email with SSL.

#5 video321

video321

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 774 posts
  • Location:NJ
  • Hardware:Elk M1, Mi Casa Verde Vera
  • Tech:Z-Wave
  • Audio:Custom
  • Video:Custom
  • CCTV:analog, dvr
  • Phone:Ooma

Posted 14 May 2012 - 12:57 PM

Upon further review... I"ll have to look into implementing this!

#6 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 14 May 2012 - 01:47 PM

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?

#7 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 14 May 2012 - 02:26 PM

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

#8 SIMKO

SIMKO

    Cocooner

  • Registered
  • PipPip
  • 57 posts
  • Experience:novice
  • Hardware:Elk M1
  • Tech:UPB

Posted 14 May 2012 - 02:31 PM

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.

#9 chrisexv6

chrisexv6

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 288 posts

Posted 14 May 2012 - 06:13 PM

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.

#10 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 14 May 2012 - 06:19 PM

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?

#11 wuench

wuench

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1364 posts
  • Location:St. Louis, MO
  • Experience:guru
  • Software:CQC, EventGhost, Harmony
  • Hardware:Elk M1, ISY-99
  • Tech:INSTEON
  • Video:XBMC
  • CCTV:dvr
  • Phone:OBi100/110

Posted 14 May 2012 - 06:33 PM

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)
; Use it for client mode
client = yes
 
[smtp]
accept=5999
connect=<server>:465

Edited by wuench, 14 May 2012 - 06:39 PM.


#12 JimS

JimS

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 430 posts
  • Experience:average
  • Software:Mister House
  • Hardware:Custom
  • Audio:Custom
  • Video:MythTV

Posted 14 May 2012 - 09:15 PM

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.

#13 treo650

treo650

    Dedicated Cocooner

  • Registered
  • PipPipPip
  • 176 posts

Posted 15 May 2012 - 01:09 AM

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)

; 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

#14 wuench

wuench

    Cocoonut

  • Registered
  • PipPipPipPip
  • 1364 posts
  • Location:St. Louis, MO
  • Experience:guru
  • Software:CQC, EventGhost, Harmony
  • Hardware:Elk M1, ISY-99
  • Tech:INSTEON
  • Video:XBMC
  • CCTV:dvr
  • Phone:OBi100/110

Posted 16 May 2012 - 01:11 PM

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....

#15 salesguy

salesguy

    Cocooner

  • Registered
  • PipPip
  • 27 posts

Posted 25 May 2012 - 11:00 AM

I just set this up on my router for use with2 CAI web controls and it works great. so easy




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users