Created
May 18, 2020 17:04
-
-
Save aweher/84bef71a29060fde9ed48f8e1d9f468f to your computer and use it in GitHub Desktop.
Creación de zonas de FW
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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