+
+ if (snat->connlimit_ports) {
+ char portcntbuf[6];
+ snprintf(portcntbuf, sizeof(portcntbuf), "%u",
+ 1 + snat->port_snat.port_max - snat->port_snat.port_min);
+
+ fw3_ipt_rule_addarg(r, false, "-m", "connlimit");
+ fw3_ipt_rule_addarg(r, false, "--connlimit-daddr", NULL);
+ fw3_ipt_rule_addarg(r, false, "--connlimit-upto", portcntbuf);
+ }