Setting up some secure services on a Linux VPS today, using Debian Lenny, had a bit of a battle with stunnel4. The stunnel.conf file I was using had been brought across from this servers predecessor (another story for another day maybe). It had worked there but I could not get it to work on this new server.

Went of searching on Google and saw several other people asking the same question, I have this error message what does it mean ‘inetd mode must define a remote host or an executable’. But no answers.

I knew I did not want inetd mode and went through the stunnel man page, it told me how to use inetd mode but not specifically how to not use it. I was coming to the conclusion that maybe the Debian packager had compiled stunnel with some particular configuration, when I came across a perl script on the stunnel.org site that was to make stunnel4 compatible with stunnel3.

I did a which stunnel on my server and it said /usr/bin/stunnel , I opened that with vim and lo and behold it was that perl wrapper script. I looked in there and saw the executable it was using was stunnel4. I used that instead of stunnel with my stunnel.conf file and hurray it worked.

So the short answer to the question I have this error message ‘inetd mode must define a remote host or an executable’ using stunnel on Debian linux what do I do? don’t use stunnel it is a wrapper script, use stunnel4.