Download as pdf or txt
Download as pdf or txt
You are on page 1of 21

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/325931179

OPENIMSCORE PRACTICE GUIDE

Presentation · January 2017


DOI: 10.13140/RG.2.2.16788.60802

CITATIONS READS
0 1,246

1 author:

Yanko Antonio Marín Muro


Universidad Central "Marta Abreu" de las Villas
16 PUBLICATIONS   7 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

Protocol Oblivious Forwarding (POF) View project

network function virtualization (nfv) View project

All content following this page was uploaded by Yanko Antonio Marín Muro on 22 June 2018.

The user has requested enhancement of the downloaded file.


PRACTICE GUIDE
IMSCUBA

Autor: MSc. Yanko Antonio Marín Muro.


2017
9

CAPITULO 1 INTRODUCCION A OPENIMSCORE 3


1.1. ABSTRACT 3
1.2. PLATAFORMA DE PRUEBAS IMS 3
1.3. TOPOLOGIA DE LA RED 5
1.4. INSTALACION DE OPENIMSCORE 6
1.4.1 Instalación de DEBIAN 8.5 32Bits 6
1.4.2 Actualización desde el repositorio 6
1.4.3 INSTALAR Y CONFIGURAR SSH 6
1.4.4 INSTALANDO OTROS PAQUETES DE SOFTWARE NECESARIOS 7
1.4.5 CONFIGURANDO LA INTERFACE DE RED 7
1.4.6 Instale los requisitos previos para OpenIMSCore 7
1.4.7 DESCARGAR OPENIMSCORE 8
1.4.8 MODIFICAR CONFIGURACION DE OPENIMSCORE 9
1.4.9 CONFIGURAR EL DNS 9
1.4.10 COMPILAR SER_IMS 11
1.4.11 COMPILAR FHoSS 11
1.4.12 Copiar los fiecheros start up 14
1.4.13 INICIANDO EL CORE IMS 14
1.5. CONFIGURACIÓN DE ABONADOS 15
1.5.1 UTILIZANDO LA INTERFACE WEB DEL HSS 15
1.5.2 UTILIZANDO COMANDOS 19
1.6. TRAZAS 20
9

CAPITULO 1 INTRODUCCION A OPENIMSCORE

1.1. Abstract

IMS (IP Multimedia Subsystem) is an architecture that enables


convergence of wireless, fixed and internet networks to provide a global
platform for multimedia communication. IMS is a SIP-based network
that serves as infrastructure for services, sessions and call control in
advanced networks.
The IP Multimedia Subsystem (IMS) is a control architecture framework
for the Next Generation Network (NGN). It is expected that this new
network architecture will provide a new kind of IP multimedia services
delivered in network converged environments.
In this paper we create a practice guide to install OpenIMscore focus on
the study of architecture, mechanisms and best practices related to
security management in IMS networks. Finally we use of this platform as
test bed for teaching, learning and performance evaluation of the main
elements of the IMS architecture based on OpenIMSCore.
The Open IMS Core is an Open Source implementation of IMS Call
Session Control Functions (CSCFs) and a lightweight Home Subscriber
Server (HSS), which together form the core elements of all IMS/NGN
architectures as specified today within 3GPP, 3GPP2, ETSI TISPAN and
the PacketCable intiative. The four components are all based upon Open
Source software(e.g. the SIP Express Router (SER) or MySQL). For
almost three years the Open IMS Core has formed the heart of the Open
IMS Playground @ FOKUS

1.2. PLATAFORMA DE PRUEBAS IMS

En este trabajo proponemos la implementación de una plataforma de


pruebas de IMS sobre el sistema operativo “Debian” que ayudará a los
investigadores a crear su propio núcleo IMS con el objetivo de estudiar
los protocolos de estas redes; así como evaluar el comportamiento de
las mismas ante los diferentes tipos de ataques que fueron presentados
anteriormente. Conocer la naturaleza de cada uno de los ataques
permitirá crear implementaciones de redes más seguras en cualquier
nivel de la red de telecomunicaciones.
9

Para ello utilizamos la plataforma “Open IMS Core” mostrada en la


figura 1 que es una implementación de código abierto del núcleo de una
red IMS, y que consiste de un P-CSCF, I-CSCF, S-CSCF, y un HSS. Open
Source IMS Core System es un sistema multimedia IP para pruebas
desarrollado por el Instituto Fraunhofer Fokus y no está concebida para
aplicaciones comerciales. El subsistema creado por FOKUS es un entorno
ideal para desarrolladores que desean crear aplicaciones y servicios
basados en IMS. Los componentes del CORE IMS de FOKUS están
basado en el software de código abierto “SIP Express Router (SER)”.

Figura 1: FOKUS OPEN IMS CORE.


Fuente: Open IMS Playground@FOKUS.

Figura 2: Laboratorio de pruebas. Dominio imscuba.cu.


Fuente: Autor
9

En esta etapa inicial de la investigación se logró instalar “Open IMS


Core” en un servidor “Debian” y se configuraron cada uno de los nodos
IMS para trabajar localmente el propio servidor. En la segunda etapa de
la investigación se instaló cada nodo en un servidor diferente para
aumentar el rendimiento del núcleo de IMS y disminuir el tiempo de
respuesta de la red. En la figura 2 se puede observar el topológico de la
prueba de campo implementada. Después de configurado el core de IMS
se procederá a instalar un cliente IMS en las PC1 y PC2. SP1 y SP2
serán dos teléfonos SIP MITEL 5212. Los ordenadores WF1 y WF2
accederán a la red vía WIFI y tendrán instalado clientes IMS. Los
teléfonos inteligentes 555555 y 888888 accederán a la red vía WIFI y la
aplicación IMSDROID.
En la tercera etapa de la investigación se instalará el núcleo de IMS, en
la plataforma de virtualización PROXMOX con el objetivo de incrementar
el rendimiento de la red. Para lograr lo anterior se crean máquinas
virtuales realizando funciones específicas de P-CSCF, S-CSCF. Al
incrementar lo cantidad de nodos del núcleo de la red se garantiza in
incremento de la capacidad de procesamiento de sesiones así como la
mejora de la fiabilidad del sistema ante el fallo de algún nodo.

1.3. TOPOLOGIA DE LA RED

Figura 3: Configuración de los elementos del CORE IMS. Dominio


imscuba.cu.
Fuente: Autor
9

A continuación se muestra el procedimiento para instalar OpenIMSCore


teniendo en cuenta la topología anteriormente propuesta en la figura 3.

1.4. INSTALACION DE OPENIMSCORE

1.4.1 Instalación de DEBIAN 8.5 32Bits

- Use D:\_\SW\debian-8.5.0-i386-CD-1.iso

1.4.2 Actualización desde el repositorio

#PARA EDITAR EL CONTENIDO DEL FICHERO sources.list


nano /etc/apt/sources.list

#############
# Jessie 8 #
#############
deb http://X.Y.Z.J/repositorio/debian/ jessie contrib main non-free
#Security-Updates#
deb http://X.Y.Z.J/repositorio/debian-security/ jessie/updates contrib
main non-free
#Multimedia#
deb http://X.Y.Z.J/repositorio/debian-multimedia/ jessie main non-free
# Cargas en ram esta configuracion
apt-get update
# Actualizas tu sistema instalado con los paquetes nuevos del
repositorio
apt-get upgrade

1.4.3 INSTALAR Y CONFIGURAR SSH

# apt-get install ssh


# nano /etc/ssh/sshd_config
Modificar en /etc/ssh/sshd_config: PermitRootLogin --> yes
Y restart sshd
9

Posteriormente continuar la instalación utilizando el software WinSCP.

1.4.4 INSTALANDO OTROS PAQUETES DE SOFTWARE


NECESARIOS

- apt-get install tcpdump


- apt-get install wireshark

1.4.5 CONFIGURANDO LA INTERFACE DE RED

Declarando la dirección de la interface estática:


- /etc/network/interfaces:

# The loopback network interface


auto lo
iface lo inet loopback

-> # The primary network interface


allow-hotplug eth0
#iface eth0 inet dhcp
iface eth0 inet static
address 10.10.10.1
netmask 255.255.255.0
broadcast 10.10.10.255
gateway 10.10.10.254

restart network:
- /etc/init.d/networking restart
--> due to changed interface data eth0 is dead (unknown)
- ifup eth0

1.4.6 Instale los requisitos previos para OpenIMSCore

sudo apt-get install subversion


sudo apt-get install gcc
9

sudo apt-get install make


sudo apt-get install openjdk-7-jdk
sudo apt-get install openjdk-7-jre-headless
sudo apt-get install openjdk-7-jre-lib
sudo apt-get install ant
sudo apt-get install bison
sudo apt-get install flex
sudo apt-get install libxml2 libxml2-dev
sudo apt-get install ipsec-tools
sudo apt-get install curl
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install bind9

Instalar mysql:
sudo apt-get install mysql-server-5.5
sudo apt-get install mysql-client-5.5
sudo apt-get install libmysqlclient-dev

root password = root


- enable access to mysql from remote hosts (very generous and
dangerous in real world):
mysql -u root -p
GRANT ALL ON *.* TO root IDENTIFIED BY 'root';
quit
- replace bind-address in /etc/mysql/my.cnf to 10.10.10.1 (instead of
127.0.0.1) to enable remote access
nano /etc/mysql/my.cnf
- restart mysql and check via command "tail -F /var/log/syslog" for
errors
/etc/init.d/mysql stop
/etc/init.d/mysql start
- check remote access via MySQL workbench

1.4.7 DESCARGAR OPENIMSCORE

Create \ser ims" directory and get SER source code:


sudo mkdir /opt/OpenIMSCore
cd /opt/OpenIMSCore
9

sudo mkdir ser_ims


sudo svn checkout https://svn.code.sf.net/p/openimscore/code/ser_ims/trunk ser_ims

Create \FHoSS" directory and get HSS source code:


sudo mkdir FHoSS
sudo svn checkout https://svn.code.sf.net/p/openimscore/code/FHoSS/trunk FHoSS

1.4.8 MODIFICAR CONFIGURACION DE OPENIMSCORE

Esto permite actualizar el dominio y la IP de los ficheros de


configuración.
cd /opt/OpenIMSCore/ser_ims/cfg
./configurator.sh /opt/OpenIMSCore/ser_ims/cfg/pcscf.cfg
/opt/OpenIMSCore/ser_ims/cfg/icscf.cfg /opt/OpenIMSCore/ser_ims/cfg/icscf.xml
/opt/OpenIMSCore/ser_ims/cfg/scscf.cfg /opt/OpenIMSCore/ser_ims/cfg/scscf.xml
/opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone

Dominio: imscuba.test
IP:10.10.10.1

1.4.9 CONFIGURAR EL DNS

Para configurar el servidor DNS necesitamos realizar lo siguiente:


Dominio: imscuba.test
IP:10.10.10.1

//Editar el fichero named.conf.local


root@lab:/# nano /etc/bind/named.conf.local
zone "imscuba.test" {
type master;
file "/etc/bind/imscuba.dnszone";
};
O puede se puede utilizar este commando:
root@imscore:/# cd etc/bind/
sed -i '3azone "imscuba.test" {\n\ttype master;\n\tfile
"\/etc\/bind\/imscuba.dnszone";\n};' /etc/bind/named.conf.local

// Copiar la plantilla de OpenIMS Core a la carpeta bind


cp /opt/OpenIMSCore/ser_ims/cfg/open-ims.dnszone /etc/bind/
9

luego renombrar el fichero a imscuba.dnszone


Agregar el nombre del servidor a este fichero
imscore 1D IN A 10.10.10.1

//Editar el fichero etc/hosts


root@lab:/# nano etc/hosts
127.0.0.1 localhost
127.0.1.1 imscore
10.10.10.1 imscore
10.10.10.1 pcscf
10.10.10.1 scscf
10.10.10.1 trcf
10.10.10.1 bgcf
10.10.10.1 mgcf
10.10.10.1 hss
10.10.10.1 ue
10.10.10.1 presence
10.10.10.1 pcrf
10.10.10.1 clf
Nota: Si no ponemos esto el MySQL no resuelve los nombres y no
funciona correctamente.

//Editar el fichero /etc/resolv.conf


root@lab:/# nano etc/resolv.conf
domain imscuba.test
search imscuba.test
nameserver 10.10.10.1
Nota: Siempre que reinicia el sistema se pierde la configuración.

//Inicializar el Bind y verificar el funcionamiento


/etc/init.d/bind9 restart

//Para comprobar el correcto funcionamiento del DNS


dig imscuba.test
9

root@imscore:/# ping hss


Aquí verificamos que status: NOERROR

1.4.10 COMPILAR SER_IMS

//VISUALIZAR LA CONFIGURACION DE LAS VARIABLES DE JAVA


echo $JAVA_HOME
echo $CLASSPATH
echo $PATH
which java
whereis java
Con esta variante cada vez que el SO arranca carga las variables
definidas en este fichero. Editar el fichero: /etc/profile y agragarle al
final las siguientes líneas:

export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-i386
export
CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$JAVA_HOME/bin:$PATH

//Compilar ser_ims:
cd ser_ims
make install-libs all
cd ..

1.4.11 COMPILAR FHoSS

Compilar FHoSS:
Make sure, that the JDK version that you are using is >= 1.5!!!
cd FHoSS
ant compile
ant deploy
cd ..

adapt all configuration files:


9

change the domain name by using configurator.sh (apply script in three


directories):
usage: in order to change the domain name and ip address you can use
a script(configurator.sh) at ser_ims/cfg/.
Copy the all *.sql *.cfg *.xml files that you want to modify to the same
directory as configurator.sh and execute it.
- directory: cd /opt/OpenIMSCore/FHoSS/deploy
cd /opt/OpenIMSCore/ser_ims/cfg/
root@lab:/opt/OpenIMSCore/ser_ims/cfg#./configurator.sh
/opt/OpenIMSCore/FHoSS/deploy/c3p0.properties
/opt/OpenIMSCore/FHoSS/deploy/DiameterPeerHSS.xml
/opt/OpenIMSCore/FHoSS/deploy/hibernate.properties
/opt/OpenIMSCore/FHoSS/deploy/hss.properties
/opt/OpenIMSCore/FHoSS/deploy/log4j.properties
Dominio: imscuba.test
IP:10.10.10.1

- directory: /opt/OpenIMSCore/FHoSS/scripts
root@lab:/opt/OpenIMSCore/ser_ims/cfg#./configurator.sh
/opt/OpenIMSCore/FHoSS/scripts/hss_db_migrate_dsai.sql
/opt/OpenIMSCore/FHoSS/scripts/hss_db.sql
/opt/OpenIMSCore/FHoSS/scripts/userdata.sql
Dominio: imscuba.test
IP:10.10.10.1

prepare mysql database:


in case of OpenIMSCore update drop old databases: hss_db
mysql -u root -p
drop database hss_db;
quit
create new databases: go to directory /opt/OpenIMSCore
cd ../..
cd /opt/OpenIMSCore
mysql -u root -p < FHoSS/scripts/hss_db.sql
mysql -u root -p < FHoSS/scripts/userdata.sql
mysql -u root -p < ser_ims/cfg/icscf.sql

Modify mysql access rights at first time installation (not covered by


configurator):
9

mysql -u root -p
# see last line in hss_db.sql:
grant delete,insert,select,update on hss_db.* to hss@imscore.imscuba.test identified
by 'hss';
grant delete,insert,select,update on icscf.* to icscf@imscore.imscuba.test identified by
'heslo';
grant delete,insert,select,update on icscf.* to provisioning@imscore.imscuba.test
identified by 'provi';
quit
grant delete,insert,select,update on hss_db.* to hss@10.10.10.1 identified by 'hss';
grant delete,insert,select,update on icscf.* to icscf@10.10.10.1 identified by 'heslo';
grant delete,insert,select,update on icscf.* to provisioning@10.10.10.1 identified by
'provi';

various entries and privileges


or manually: e.g.
show databases;
use hss_db;
select * from impu;

check database with MySQL Workbench if domain names are o.k. in


Cuando no son agregados los permisos en el MySQL para la IP del
servidor
9

1.4.12 Copiar los fiecheros start up

cd /opt/OpenIMSCore
sudo cp ser_ims/cfg/*.cfg ./
sudo cp ser_ims/cfg/*.xml ./
sudo cp ser_ims/cfg/*.sh ./

Prepare script-file, last modifications and start ...

copy startup.sh to hss.sh in root directory


cp /opt/OpenIMSCore/FHoSS/deploy/startup.sh /root/hss.sh
and add to hss.sh
cd /opt/OpenIMSCore/FHoSS/deploy
JAVA_HOME="/usr/lib/jvm/java-7-openjdk-i386"
Queda así:

1.4.13 INICIANDO EL CORE IMS

cd /opt/OpenIMSCore/
9

sudo ./pcscf.sh
sudo ./scscf.sh
sudo ./icscf.sh
start HSS from /root: ./hss.sh
//Otra variante para el HSS
cd FHoSS/deploy
sudo sh startup.sh

access the web-interface of HSS:


http://hss.imscuba.test:8080/hss.web.console/
user: hssAdmin
password: hss

1.5. CONFIGURACIÓN DE ABONADOS

1.5.1 UTILIZANDO LA INTERFACE WEB DEL HSS

El procedimiento es el siguiente:
By default, FHoSS comes provisioned with a couple of sample users:
alice@open-ims.test
bob@open-ims.test
Use these or insert new ones.
Create a Subscription
Create a Private Identity
Create a Public Identity
Link them
Recopilando los datos necesarios para la creación de usuarios

Crear el IMPI (Private User Identity): ADD HSDAINF

Con este comando creamos un nuevo registro a la base de datos de los


servicios del HSS que se utiliza para la autentificación SIP DIGEST.
9
9

Crear el IMPU (Private User Identity): ADD HIMPU

Este comando se utiliza para adcionar una IMPU a un IMPI existente


Aqui en ID del usuario o Subscription ID se crea de forma automática
igual que el registro implicito.

Para asociar el IMPU al IMPI creado (ADD HIMPU):


En la misma págica pero en la opción Associate IMPU(s) to IMPI.
Escribimos el IMPI y luego le damos ADD.
9

AGREGAR LAS REDES VISITADAS DEL USUARIO (SET HVNTPLID):


9

CREANDO LA SUBSCRIPCION IMS (ADD HSUB):

1.5.2 UTILIZANDO COMANDOS

Para crear un usuario IMS debemos entrar en el directorio y ejecutar


./multiuser.sh -s <start_index> -e <start_index> [-a|-d]
Donde
-s Start index of Username.
-e End index of Username.
-a Add User.
-d Delete User.
9

cd /opt/OpenIMSCore/ser_ims/cfg

./add-imscore-user.sh -u yanko -t tel:+5341000000 -r imscuba.test -p


yanko -a

1.6. TRAZAS

Capturar todo menos telnet y mysql


tcpdump -i any -s 3000 -w /var/tmp/trace_ims_register.pcap not port
22 and not port 3306
//Variante avanzada.
tcpdump -i any -s 3000 -w /var/tmp/trace.pcap
tcpdump -i any -w /var/tmp/trace_ims_startup.pcap not port 22

También podemos ejecutar el wireshark:


wireshark &
Habilitar el filtro:
//Filtro ideal para IMS
sip or diameter.applicationId or dns

//Funciona correctamente
sip or diameter.applicationId == 16777216 or dns

sip or diameter.applicationId == 16777216 or dns

diameter.applicationId == 16777216 --->Interface Cx

diameter.Acct-Application-Id == 0

View publication stats

You might also like