Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I currently bought an Mac, so I'm a noob :). I used to connect to my server using stunnel on windows & ubuntu. I'm also a noob in networking.

I check website download section, and there's no mac version, but in users-community mailing list I see some posts about running it under mac os. but they didn't help to figure out what should I do.

so anyone can help me install stunnel on mountain lion (10.8.2), or tell me is there any alternative app?

share|improve this question
add comment

3 Answers

up vote 5 down vote accepted

What you like to do ... there is a working SSH / SSL already on your Mac. If you like to build stunnel you need Xcode with the CLI tools ... and some time. I haven´t tried it but a quick look in the build instructions looks as if there are no big problems.


As promised, here are the steps to build stunnel from source. I used a Lion machine but it is the same on a Mountain Lion machine. There is no need for Fink, MacPorts or Homebrew ... brings more troubles then it helps.

Go to https://www.stunnel.org/downloads.html and download stunnel-4.54.tar.gz and stunnel-4.54.tar.gz.sha256. Open a terminal Utilities => Terminal>. Terminal is case sensitive, before you do something think twice before you press return - there is no undo or redo in terminal. Each line is one line in terminal and needs to press return at the end of the line.

cd $HOME/Downloads
openssl dgst -sha256 stunnel-4.54.tar.gz
more stunnel-4.54.tar.gz.sha256

Compare the output of the last 2 lines - if it matches all is fine, if not you had a security problem during download.

tar -xzvf stunnel-4.54.tar.gz
cd stunnel-4.54
./configure && make && make check && sudo make install

The configure script uses autoconf, so put your fingers away from other options because if all is there and supported it will build a fine 64 bit app for you. make check is optionally. sudo make install requires your admin password. During this step you had to input some basic informations (self explaining). The && is used to run one command after each other ONLY if the last was successful.

After all is done your stunned app was installed in /usr/local/bin. To run it, open terminal and type stunnel or stunnel3 (see the docs for the difference) and press return.

For the config file type in terminal.

cd /usr/local/etc/stunnel
sudo cp stunnel.conf-sampl stunnel.conf
sudo pico stunnel.conf

For the documentation of pico use in terminal.

man pico

If I had some mistypes of filenames or anything else here use in terminal the following command to list a directory

ls -la

For the rest, have fun with stunned and the documentation of it !

share|improve this answer
1  
Here code.google.com/p/rudix/downloads/… is another way to install it. –  NaWi at Mac Jan 19 '13 at 1:08
    
thanks I'm downloading Xcode right now, I'd ask you again if I had another problem :) –  Behzadsh Jan 19 '13 at 10:12
    
After downloading Xcode from App store go to preferences=>downloads and download also the command line tools. Later I will try to build it. –  NaWi at Mac Jan 19 '13 at 16:34
    
Thank you for your help ;) –  Behzadsh Jan 21 '13 at 12:44
add comment

This can be installed using homebrew:

brew install stunnel
share|improve this answer
add comment

To install many UNIX, GNU, and other open source tools including stunnel I recommend to use the MacPorts package management system in addition of the XCode command line tools. MacPorts will keep these softwares easy to manage. Additionally, some of the softwares have special MacPorts' build which work nicer with OS X system.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.