Rules are in /etc/ipmasq/rules. * A: pre-initialization * I: input rules * F: forward rules * O: Output rules * M: masquerading rules * Z: post-initialization

You can override the default rules in the *.def file by adding new files with the same name but the extension .rul.