NF_SRTP : protect RTP connections with netfilter/iptables and libsrtp | |
General informationDevelopment |
InstallationFirst unzip the archive, then change to the corresponding directory ./configure See the 'Requirements' section. Requirementslibsrtp and libipq are necessary to run NF_SRTP. libsrtp : This program was built from the libsrtp
API : http://srtp.sourceforge.net/srtp.html In this example, we specify the main libsrtp directory as /local/srtp : [host]$./configure srtp_dir=/local/srtp/
Taken from iptables/netfilter : http://www.netfilter.org. Usage exampleAs an example, we run David A. McGrew's rtpw testing program (libsrtp based) on two hosts. The sending host sends an SRTP encrypted and authenticated stream to the receiving one, which runs rtpw without any security service. Fig 1 : SRTP stream processed by an intermediate gateway As we did not ask for any security service on the receiving side through
rtpw, On the receiving host, SRTP packets will be queued (based on UDP destination port) using iptables. nf_srtp_processor will grab/process/reinject these packets to the kernel after before their processing by the running rtpw program on the receiving host. Example : starting rtpw with confidentiality and message authentication on host 10.1.1.1 : [10.1.1.1]$set k=c1eec3717da76195bb878578790af71c4ee9f859e197a414a78d5abc7451 Starting rtpw without any security service on host 10.1.1.2. Security service is handled by nf_srtp_processor : Queuing packets to userspace with netfilter/iptables: Loading IPQ kernel module: Handling packet decryption and authentication check through the nf_srtp_processor
intance. The key must be the same as for the sending rtpw
application : Starting rtpw without
any security service on the receiving side: Another uage example is given hereafter. NF_SRTP resides on both communicating hosts, along with two clear RTP applications. These applications are not aware of any protection taking place between them. Fig 2 : Two RTP apps, processed locally by two matching NF_SRTP instances Note (on using rtpw
without security service): Here is the diff obtained :
function randhex() { |