[Freeswitch-users] Achieving TLS + SRTP for inbound calls

David P davidswalkabout at gmail.com
Thu May 31 00:52:42 UTC 2018


FWIW, I just spun-up a new debian jessie EC2, and installed FS without
creating /etc/freeswitch first. Weirdly, without my requesting them,
/etc/freeswitch/tls/ now has a wss.pem and a dtls-srtp.pem. I guess this is
what Mike was talking about when he said:

>  we will gen whats needed for dtls srtp automatically, you need to
provide the cert for wss (same as what you need for tls, as wss is just tls
secured ws)  It does require the cert and chain.

I thought that would happen only after I ran gentls_cert manually.

These aren't the pem files I need, because they have no chain section. I
guess that's what makes them self-signed. I guess what I need to do is
overwrite these two files with a concatenation of the files generated by
certbot. It puts a README in there that says:

`privkey.pem`  : the private key for your certificate.
`fullchain.pem`: the certificate file used in most server software.
`chain.pem`    : used for OCSP stapling in Nginx >=1.3.7.
`cert.pem`     : will break many server configurations, and should not be
used
                 without reading further documentation (see link below).

But the format FS wants for wss.pem is: cert, privkey, chain. Maybe that
would be> cat cert.pem privkey.pem chain.pem > wss.pem but the README
warning about cert.pem concerns me.

What format must dtls-srtp.pem have? Can it just be a copy of wss.pem?

Cheers,
David

On Wed, May 30, 2018 at 4:33 PM, David P <davidswalkabout at gmail.com> wrote:

> Hi Joel and Branden,
>
> I have three goals:
> 1) To have an FS install that secures all WebRTC and SIP traffic to it
> 2) An install that doesn't require WebRTC users to manually fetch the
> certificate
> 3) An install that uses only production-ready software
>
> For goal 1, Mike and Giovanni have said a Debian Jessie minimal is the
> best or only choice.
>
> For goal 2, I'm avoiding gentls_cert and its self-signed certs. As a first
> attempt, I'm trying to get a free CA cert from LetsEncrypt via certbot.
> Unfortunately, doing this on debian jessie requires that I use backports
> that are described as "as-is", so I'm sacrificing goal 3 for the time being.
>
> In order to inform FS where it can find the private key, cert, and chain,
> I was planning to introduce soft links to the files that certbot put
> under /etc/letsencrypt/live/my.domain.com/
>
> I'm ready to do that, except that sip_profiles/internal.xml isn't where it
> normally would be, because I followed https://freeswitch.
> org/confluence/display/FREESWITCH/Debian+8+Jessie#highlighter_549778 and
> created /etc/freeswitch/ without knowing why I should do that. So
>  /usr/local/freeswitch/  does not exist, unfortunately. Also, echo
> ${prefix} is blank. So, I did a find from slash for internal.xml and found
> four matches:
>
> /usr/share/freeswitch/conf/insideout/sip_profiles/internal.xml
> /usr/share/freeswitch/conf/sbc/sbc_profiles/internal.xml
> /usr/share/freeswitch/conf/vanilla/sip_profiles/internal.xml
> /usr/share/freeswitch/conf/vanilla/skinny_profiles/internal.xml
>
> Which of these should I edit?
>
> Also, is it necessary to concatenate my private key, cert, and chain into
> a "wss.pem" as suggested at https://freeswitch.org/
> confluence/display/FREESWITCH/WebRTC#highlighter_647427
>
> Cheers,
> David
>
> On Tue, May 29, 2018 at 12:34 PM, Joel Serrano <joel at textplus.com> wrote:
>
>> Hi David,
>>
>> So it all depends.. Those docs are just introductions to get a setup "up
>> and running". For example, in the docs you generate self-signed
>> certificates that (although perfectly valid) can give you issues with
>> browsers because their CA is not trusted, etc. Regarding expiration, it all
>> depends, as this is something you choose.
>>
>> Going down to your specific problems:
>>
>> 1- ..${prefix}.. is just a variable, that will be replaced with a value,
>> normally /usr/local/freeswitch, but can be anything (depending on where you
>> installed FS).
>> 2- When it comes to the "path" that you specify in the config for the
>> certificates, it can also be anything, the important part is that you make
>> sure that the user you run FS with has access to reading those files. If
>> you don't like using ${prefix} you can directly set /path/to/your/certs,
>> just remember double checking the permissions.
>> 3- When you renew your certificate, you will have to make FS aware of
>> that, I'd have to check but I'm pretty sure that after updating the files a
>> sofia profile rescan should be enough.
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20180530/1941e77f/attachment-0001.html>


More information about the FreeSWITCH-users mailing list