How to Configure direct access to UE instead of NAT
When MME is launched, it creates a Linux virtual TUN interface for each PDN.
Then, UE can access MME local network through NAT.
If the IP range of the PDN matches local network interface, NAT won't be used and UE will be reachable from remote machine on same local network.
For this, lte_init.sh script has to be launched (which is the case on Amarisoft Callboxes or if you run the LTE service) on network interface to use.
MME configuration example:
- Local network is 192.168.0.0/24
- Network interface is 192.168.0.40
- PDN subnet is 192.168.0.64/27
- MME config file will be:
Doing this will disable NAT for this PDN. Note that you can also control NAT behaviour by editing MME_INIT variable in your ots.cfg file:
- If you run a version older than 2022-02-04, --no-nat option will disable IPv4 and IPv6 NAT for all PDNs
- With a later release, --no-nat will disable IPv4 NAT and --no-nat6 will disable IPv6 NAT
The first associated TUN interface will require an IP address that must not be inside the IP range, you can define it using gateway parameter or let the default behaviour.
Warning: to avoid any issue on your local system, be aware that the PDN tun interface will
be configured with the smallest subnet including the defined IP address range plus the IP before first_ip_addr (Used as tun
IP address).
In other words, when MME is launched, check that tun interface IP subnet does not include any IP of machines
already present on your local network: as ARP proxy is enabled, those machine may become unreachable.