This is an impementation of NEXTEPC in docker container. It consist of two parts MongoDB docker and the NEXTEPC docker.
tested with srslte enb and srsue and COTS UEs
- install docker
sudo apt-get update
sudo apt install docker-ce docker-ce-cli containerd.io
docker network create my-mongo-node
- create a mongodb in docker and run it:
mkdir ~/data
docker run -d -v ~/data:/data/db --name nextepcdb -p 27017:27017 --network my-mongo-node mongo
- get the docker file and go to the cloned directory:
cd NEXTEPC-DOCKER
- Build the docker image in the Dockerfile directory:
docker build -t test_image_nextepc:1.0 .
- Run the docker container:
docker run -d -t --cap-add=NET_ADMIN --device=/dev/net/tun --name epc --network host --privileged=true test_image_nextepc:1.0
sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.netdev
[NetDev]
Name=pgwtun
Kind=tun EOF"
$ sudo sh -c "cat << EOF > /etc/systemd/network/99-nextepc.network
[Match]
Name=pgwtun
[Network]
Address=45.45.0.1/16
Address=cafe::1/64
EOF"
sudo systemctl enable systemd-networkd
sudo systemctl restart systemd-networkd
./script/run.sh
Configuration file can be found in .config and shuld be change accourding to the network setup
- build the NEXTEPC GUI interface:
cd webgui
docker build -t besherch/node-webui-nextepc .
docker run -p 49160:3000 --network my-mongo-node -e DB_URI=mongodb://nextepcdb:27017/nextepc -d besherch/node-webui-nextepc
The Web UI should be up and running on http://localhost:49160/
Config file can be found in .config/nextepc.conf . Copy the file to the /home/.config/nextepc
- if the EPC is accessed remotly set the following in nextepc.conf
s1ap:
dev: lo
- if the eNB is running on the same machine:
s1ap:
addr: 127.0.1.100
Only in case of remote access of the EPC
sudo iptables -A FORWARD -i $ifname -o pgwtun -m state --state RELATED,ESTABLISHED -j ACCEPT
sudo iptables -A FORWARD -o $ifname -i pgwtun -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o $ifname -j MASQUERADE
sudo iptables -A FORWARD -i pgwtun -j ACCEPT
sudo iptables -t nat -A POSTROUTING -o pgwtun -j MASQUERADE