CGNAT - Mikrotik Script for generating CGNAT rules on Mikrotik

What is CGNAT?

CGNAT (Carrier-Grade NAT) is a network address translation technique used by Internet Service Providers (ISPs) to share a single public IP address among multiple customers. With the scarcity of IPv4 addresses, CGNAT allows operators to serve more users without acquiring new public IP blocks.

How does the generator work?

Fill in the fields with the public network address, subnet mask, initial internal IP, and number of ports per client. The generator automatically calculates the NAT rules and produces a script ready to be imported into your Mikrotik router via terminal or Winbox.

Mikrotik Compatibility

The generated script is compatible with RouterOS and can be applied directly on Mikrotik. The rules are generated in RouterOS firewall/NAT format, ensuring high performance and granular port control per client in CGNAT environments.

Free tool

This generator is provided free of charge by Made4it for the ISP and network technician community. No account creation or software installation is required — just fill in the form and copy the generated script.