|
|
@ -95,7 +95,10 @@ def main(): |
|
|
nat_log += aloes_nat.manage() |
|
|
nat_log += aloes_nat.manage() |
|
|
logging.info("Done.") |
|
|
logging.info("Done.") |
|
|
|
|
|
|
|
|
filename = "/var/log/nat-%s.log" % ctime |
|
|
nat_directory = "/var/log/nat/" |
|
|
|
|
|
if not os.path.exists(nat_directory): |
|
|
|
|
|
os.makedirs(nat_directory) |
|
|
|
|
|
filename = os.path.join(nat_directory, "nat_%s.log" % time.strftime('%Y_%m_%d_%Hh_%Mm')) |
|
|
|
|
|
|
|
|
logging.info("Saving nat table into " + filename) |
|
|
logging.info("Saving nat table into " + filename) |
|
|
with open(filename, 'a') as f: |
|
|
with open(filename, 'a') as f: |
|
|
|