en:сgnat_settings [Документация VAS Experts]

This is an old revision of the document!


For CGNAT activation use service 11.

Create named profile fo 11 service that defines CGNAT IP pool parameters:

fdpi_ctrl load profile --service 11  --profile.name test_nat --profile.json '{ "nat_ip_pool" : "5.200.43.0/24", "nat_tcp_max_sessions" : 1000, "nat_udp_max_sessions" : 500 }'

here
nat_ip_pool - exernal (white) IP adresses in CIDR
nat_tcp_max_sessions - maximum number of TCP session that subscriber can create
nat_udp_max_sessions - maximum number of UDP session that subscriber can create

Activate 11 service to subscriber with named profile (assign the pool with pareameters above)

fdpi_ctrl load --service 11 --profile.name test_nat --ip 192.168.0.1
or
fdpi_ctrl load --service 11 --profile.name test_nat --login test_subs

Additional in global parameters /etc/dpi/fastdpi.conf possible to set:
nat_ports=1024-65535 - port range using for NAT translation on external (white) IP addreses (default value is in example)
nat_profiles=24 - maximum number of named profiles with CGNAT pool parameters (allowed maximum parameter value 65000, server memory also limit this parameter)