From 56b45b972dfbc3ef54319e6e2db7a39f7a5f751c Mon Sep 17 00:00:00 2001
From: Carlos Antonio De Lima Filho <carlos.lima.106@ufrn.edu.br>
Date: Mon, 2 Dec 2024 00:50:21 +0000
Subject: [PATCH] Update README.md

---
 .../README.md                                 | 22 +++++++++++++++----
 1 file changed, 18 insertions(+), 4 deletions(-)

diff --git a/openairinterface5g/openairinterface-install-scripts/README.md b/openairinterface5g/openairinterface-install-scripts/README.md
index 8f65972f..934f7494 100644
--- a/openairinterface5g/openairinterface-install-scripts/README.md
+++ b/openairinterface5g/openairinterface-install-scripts/README.md
@@ -278,7 +278,13 @@ However, if you are trying to connect to the 5G Core located on another PC, you
 
 > sudo ip netns exec oai-ue1 iptables -P FORWARD ACCEPT
 
-**Step 11:** Configure the IMSI, Permanent Key and OPC
+**Step 11:** Enable packet forwarding on the Host:
+
+> echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
+>
+> sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 ! -o veth0 -j MASQUERADE
+
+**Step 12:** Configure the IMSI, Permanent Key and OPC
 
 This part you will configure the UE parameters. The UE parameters file is /home/dco1020/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf. The first three lines of the file are composed by the IMSI, Permanent Key and OPC, as shown in figure below. You will configure these parameters. 
 
@@ -362,15 +368,23 @@ The UE parameters (figure below) must be equal to the slice 1 configuration file
 
 > sudo ip netns exec oai-ue2 sysctl net.ipv4.conf.all.forwarding=1
 
-**Step 10:** Setting default policy for packet forwarding within the namespace to ACCEPT::
+**Step 10:** Setting default policy for packet forwarding within the namespace to ACCEPT:
+
+**Important:** If you are using the same PC for both UEs, and you have already done the configuration for the UE 1, you can skip the commands below. 
 
 > sudo ip netns exec oai-ue2 iptables -P FORWARD ACCEPT
 
-**Step 11:** Copy the UE file:
+**Step 11:** Enable packet forwarding on the Host:
+
+> echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
+>
+> sudo iptables -t nat -A POSTROUTING -s 192.168.1.0/24 ! -o veth0 -j MASQUERADE
+
+**Step 12:** Copy the UE file:
 
 > cp /home/$your user$/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue.conf /home/$your user$/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue2.conf
 
-**Step 12:** Configure the IMSI, Permanent Key and OPC
+**Step 13:** Configure the IMSI, Permanent Key and OPC
 
 This part you will configure the UE parameters. The UE parameters file is /home/dco1020/openairinterface5g/targets/PROJECTS/GENERIC-NR-5GC/CONF/ue2.conf. The first three lines of the file are composed by the IMSI, Permanent Key and OPC, as shown in figure below. You will configure these parameters. 
 
-- 
GitLab