When trying to save and restore a nat-rule with MASQUERADE target with the option "--to-ports 10000", the restore failed.
The save function didn't work correct. Here is the PATCH that fixes the save function. -- Andries van Schie Let's make the linux-world a safer place to live in ;-)
--- lastest-netfilter/userspace/extensions/libipt_MASQUERADE.c Sat Mar 23 10:17:27 2002 +++ netfilter/userspace/extensions/libipt_MASQUERADE.c Sun Mar 31 10:52:04 2002 @@ -139,7 +139,7 @@ struct ip_nat_range *r = &mr->range[0]; if (r->flags & IP_NAT_RANGE_PROTO_SPECIFIED) { - printf("%hu", ntohs(r->min.tcp.port)); + printf("--to-ports %hu", ntohs(r->min.tcp.port)); if (r->max.tcp.port != r->min.tcp.port) printf("-%hu", ntohs(r->max.tcp.port)); printf(" ");