You should find a virtual interface (demo-oai) (as shown in figure below). This interface serves to connect the gNB with OAI-AMF. You must get its IP address and name to configure the N2 interface such as two figures before.
However, if you are trying to connect to the 5G Core located on another PC, you need to configure the routes accordingly.
However, if you are trying to connect to the 5G Core located on another PC, you need to configure the routes accordingly. You can use the command below.
> sudo ip route add 192.168.70.0/24 via "IP_PC_CORE" dev "INTERFACE_CONNECTED_WITH_PC_CORE"