LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Stunnel does not show up in processes after running it. (https://www.linuxquestions.org/questions/linux-software-2/stunnel-does-not-show-up-in-processes-after-running-it-208820/)

Doctor Nick 07-23-2004 02:26 PM

Stunnel does not show up in processes after running it.
 
I'm trying to set up a SSL-SOCKS server according to jestrix.net/tuts/sslsocks.html so I can use BitTorrent at my university. Unfortunately, I've run into a snag. When I get up to the point where I actually run stunnel, it says "command not found". Ok, so I do a search for "stunnel", find where the program is actually located, and run "./stunnel". Then it asks me for me passphrase, and then we're up and running, right? According to the KDE system guard, not so. I dont see any process called "stunnel" or ANY processes running under the user "stunnel" (The tutorial is set up so stunnel will run under the user "stunnel" in group "stunnel", yes, I did set those up.). This is the third time I've tried to do this set up (Under FreeBSD, FedoraC2, and now Suse 9.1), and it's done this every time. Can anyone please help me out here?

J_Szucs 07-23-2004 04:24 PM

Stunnel tends to silently die if there is any error e.g. with the start-up parameters. Are you sure it is running?
Have you checked it as root from konsole? (ps -ax)

Are there any error messages in /var/log/messages?

Doctor Nick 07-23-2004 05:05 PM

Ah ha, found some messages:
Code:

Jul 23 17:56:46 linux stunnel[3504]: stunnel 4.05 on i686-pc-linux-gnu PTHREAD with OpenSSL 0.9.7d 17 Mar 2004
Jul 23 17:56:48 linux stunnel[3504]: Peer certificate location /trusted
Jul 23 17:56:48 linux stunnel[3504]: FD_SETSIZE=1024, file ulimit=1024 -> 500 clients allowed
Jul 23 17:56:48 linux stunnel[3504]: Error binding socks5 to 192.168.1.107:1080
Jul 23 17:56:48 linux stunnel[3504]: bind: Cannot assign requested address (99)

I'm not quite sure what ip address I have to use for stunnel, the tutorial is pretty vague on that. It just says "external" IP. Im not sure if that means "use the one you get from whatismyip.com" or the one assigned to the machine by my router.

J_Szucs 07-23-2004 06:08 PM

Anyway, it should an existing IP address, assigned to an interface on the machine where stunnel and nylon are running.
Ifconfig will show you the interfaces and the IP addresses assigned to them.

Doctor Nick 07-23-2004 09:35 PM

I've got the correct Ip address now, but now it's giving me this:
Code:

Jul 23 22:30:38 linux stunnel[9091]: stunnel 4.05 on i686-pc-linux-gnu PTHREAD with OpenSSL 0.9.7d 17 Mar 2004
Jul 23 22:30:40 linux stunnel[9091]: Peer certificate location /trusted
Jul 23 22:30:40 linux stunnel[9091]: FD_SETSIZE=1024, file ulimit=1024 -> 500 clients allowed
Jul 23 22:30:40 linux stunnel[9092]: Cannot create pid file /stunnel.pid
Jul 23 22:30:40 linux stunnel[9092]: create: Permission denied (13)

Any idea what to do?

Doctor Nick 07-24-2004 03:31 PM

bump.

J_Szucs 07-25-2004 06:01 AM

It is a prmission problem: the user running stunnel cannot create the pid file in the "/" directory.

That is OK, as it is not a good idea to create pid files in the root directory.
The usual place for pid files is /var/run/.

You can specify the place of the pid file on the command line. Doublecheck that the directory you specify is writeable for the user running stunnel.

Doctor Nick 07-29-2004 05:04 PM

I'm having really bad luck with this. I set the directory to /var/tmp/stunnel/, and now it's giving me this.

Code:

Jul 27 18:16:33 linux stunnel[11160]: stunnel 4.05 on i686-pc-linux-gnu PTHREAD with OpenSSL 0.9.7d 17 Mar 2004
Jul 27 18:16:35 linux stunnel[11160]: Peer certificate location /var/tmp/stunnel/trusted
Jul 27 18:16:35 linux stunnel[11160]: FD_SETSIZE=1024, file ulimit=1024 -> 500 clients allowed
Jul 27 18:16:35 linux stunnel[11161]: Cannot create pid file /var/tmp/stunnel/stunnel.pid
Jul 27 18:16:35 linux stunnel[11161]: create: No such file or directory (2)

I have chmod set to 700 on that dir.
I tried doing this in a directory with chmod 777, and it still gave me this.

Doctor Nick 07-29-2004 09:55 PM

bump

J_Szucs 08-07-2004 08:53 PM

Sorry, I was on holiday, and just now I see you are still having trouble with this setup.

This time I had a look at the tutorial and seeing the server config file options I think it uses a tricky setup: it chroots to the /var/tmp/stunnel directory, so any subsequent references to any other directories are relative to that directory.

This means that when you had a permission problem with the / directory ("cannot create /stunnel.pid"), you actually had a permission problem with /var/tmp/stunnel.

So, you should not specify any new location for the stunnel.pid file, just use the default one used in the tutorial, but check that the user running stunnel has permissions to create files in directory /var/tmp/stunnel


All times are GMT -5. The time now is 11:11 PM.