On Friday 2013-02-22 16:50, /dev/rob0 wrote: >On Fri, Feb 22, 2013 at 04:19:12PM +0800, Donghua Liu wrote: >> Now I have such a scenario that I should write different nat rules >> according to the designated locally port is open or not. >> For example, if the port is listening then do the nat operation, >> otherwise do not use this rule. > >There's nothing within Netfilter/iptables to do this. -m socket? -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html