help='Path to the file containing the scope IP ranges. Each IP or IP range should be on a new line. Required unless -r is set.')
parser.add_argument('-d','--deny',
help='Path to the file containing the deny list IP ranges. Each IP or IP range should be on a new line. Required unless -r is set.')
parser.add_argument('-o','--output',
help='Path to the file where to write the valid IPs. The file will be created if it does not exist. Required unless -r is set.')
parser.add_argument('-n','--rule_name',
help='Name to be used when creating or removing firewall rules. This will be used in the comment field of the iptables rules.')
parser.add_argument('-r','--remove',
help='If set with rule name, the script will remove the specified iptables rules instead of adding them. When this is set, scope, deny and output parameters can be omitted.')
args=parser.parse_args()
ifargs.remove:
ifany([args.scope,args.deny,args.output]):
parser.error("--remove should not be used with scope, deny, or output parameters.")