DEV Community

Varalta Paolo
Varalta Paolo

Posted on

How to create a Diameter lab via Docker

winpty docker run -it debian:stable bash

apt update
apt -y upgrade
apt install -y wget gnupg gnupg1 gnupg2 nano
wget http://www.freediameter.net/packages/repository.key
apt-key add repository.key

nano /etc/apt/sources.list

deb http://www.freediameter.net/packages/debian sid contrib
deb-src http://www.freediameter.net/packages/debian sid contrib

apt update
apt upgrade
apt install freediameter

Se lo faccio partire direttamente, da errore:

root@77312d941f34:/# freeDiameterd
16:35:27 NOTI libfdproto '1.2.1' initialized.
16:35:27 NOTI libgnutls '3.7.1' initialized.
16:35:27 NOTI libfdcore '1.2.1' initialized.
16:35:27 FATAL! Missing private key configuration for TLS. Please provide the TLS_cred configuration directive.
16:35:27 ERROR ERROR: in '((fd_conf_parse()))' : Invalid argument
16:35:27 ERROR ERROR: in '(fd_core_parseconf(conffile))' : Invalid argument
16:35:27 FATAL! Initiating freeDiameter shutdown sequence (1)
16:35:27 NOTI freeDiameterd framework is stopping...
16:35:27 NOTI Shutting down server sockets...
16:35:27 NOTI Sending terminate signal to all peer connections

Devo allora creare i certificati.

root@77312d941f34:/# cat /etc/freeDiameter/freeDiameter.conf

-------- Test configuration ---------

Identity = "peer1.localdomain";
Realm = "localdomain";

Port = 3868;

SecPort = 3869;

TLS_Cred = "peer1.cert.pem",

"peer1.key.pem";

TLS_CA = "cacert.pem";

LoadExtension = "extensions/test_app.fdx" : "test_app1.conf";

ConnectPeer = "peer2.localdomain" { ConnectTo = "127.0.0.1"; No_TLS; port = 30868; };

Top comments (0)