Skip to content

Instantly share code, notes, and snippets.

@aweher
Created May 18, 2020 17:04
Show Gist options
  • Save aweher/84bef71a29060fde9ed48f8e1d9f468f to your computer and use it in GitHub Desktop.
Save aweher/84bef71a29060fde9ed48f8e1d9f468f to your computer and use it in GitHub Desktop.
Creación de zonas de FW
zonas = ['OUTSIDE', 'DMZ', 'COMERCIAL', 'TECNICA', 'VPN']
def createrule(zonain, zonaout):
if zonain == zonaout:
print(f'add action=jump chain=desde-{zonain} comment="{zonain} a {zonaout}" jump-target=MISMAZONA out-interface-list={zonaout}')
else:
print(f'add action=jump chain=desde-{zonain} comment="{zonain} a {zonaout}" jump-target={zonain}-a-{zonaout} out-interface-list={zonaout}')
for zonain in zonas:
for zonaout in zonas:
createrule(zonain, zonaout)
print(f"add action=return chain=desde-{zonain}")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment