Make masquerade toggleable

This commit is contained in:
Lauri Võsandi 2021-06-02 18:44:02 +00:00
parent 9221a3cc67
commit 3da91f14d1
2 changed files with 4 additions and 2 deletions

View File

@ -267,6 +267,7 @@ def pinecone_provision():
yield ":INPUT ACCEPT [0:0]"
yield ":OUTPUT ACCEPT [0:0]"
yield ":POSTROUTING ACCEPT [0:0]"
if not const.DISABLE_MASQUERADE:
yield "-A POSTROUTING -j MASQUERADE"
yield "COMMIT"

View File

@ -177,4 +177,5 @@ SESSION_AGE = 3600
SECRET_STORAGE = getenv_in("SECRET_STORAGE", "fs", "db")
DISABLE_FIREWALL = os.getenv("DISABLE_FIREWALL") == "True" if os.getenv("DISABLE_FIREWALL") else False
DISABLE_FIREWALL = os.getenv("DISABLE_FIREWALL")
DISABLE_MASQUERADE = os.getenv("DISABLE_MASQUERADE")