Changeset 10705 in genesis


Ignore:
Timestamp:
May 7, 2012, 2:52:28 PM (13 years ago)
Author:
rick
Message:

Make template, details later.

Related-To: nodefactory#152

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/gformat.py

    r10703 r10705  
    8585    'motd',
    8686    'ntp.conf',
     87    'pf.hybrid.conf.local',
    8788    'wleiden.yaml',
    8889    ]
     
    787788
    788789
     790def generate_pf_hybrid_conf_local(datadump):
     791  """ Generate configuration file '/etc/pf.hybrid.conf.local' """
     792  datadump['autogen_header'] = generate_header("#")
     793  datadump['rdr_rules' ] = ('8081', '172.16.4.46', 'http')
     794  return Template("""\
     795{{ autogen_header }}
     796
     797# Redirect some internal facing services outside (7)
     798# rdr on $ext_if inet proto tcp from any to $ext_if port 8081 tag SRV -> 172.16.4.46 port http
     799# XXX: Implement
     800""").render(datadump)
    789801
    790802def generate_motd(datadump):
     
    908920    elif config == 'motd':
    909921      output += generate_motd(datadump)
     922    elif config == 'pf.hybrid.conf.local':
     923      output += generate_pf_hybrid_conf_local(datadump)
    910924    else:
    911925      assert False, "Config not found!"
Note: See TracChangeset for help on using the changeset viewer.