Changeset 10714 in genesis
- Timestamp:
- May 7, 2012, 8:59:45 PM (13 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
nodes/HybridRick2/wleiden.yaml
r10703 r10714 18 18 service_proxy_normal: True 19 19 status : "up" 20 rdr_host: "riff.vanderzwet.net" 21 rdr_rules : 22 - [9080, '172.17.0.41', 80] 23 - [9081, '172.17.0.42', 80] 24 - [9082, '172.17.0.43', 80] 25 - [9083, '172.17.0.44', 80] 26 remote_access: "riff.vanderzwet.net:2022" 20 27 21 28 -
tools/gformat.py
r10705 r10714 791 791 """ Generate configuration file '/etc/pf.hybrid.conf.local' """ 792 792 datadump['autogen_header'] = generate_header("#") 793 datadump['rdr_rules' ] = ('8081', '172.16.4.46', 'http')794 793 return Template("""\ 795 794 {{ autogen_header }} 796 795 797 796 # 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 797 # INFO: {{ rdr_rules|count }} rdr_rules (outside to internal redirect rules) defined. 798 {% for src_port,dest_ip,dest_port in rdr_rules -%} 799 rdr on $ext_if inet proto tcp from any to $ext_if port {{ src_port }} tag SRV -> {{ dest_ip }} port {{ dest_port }} 800 {% endfor -%} 800 801 """).render(datadump) 801 802 … … 855 856 iface_keys = [elem for elem in datadump.keys() if elem.startswith('iface_')] 856 857 for key in sorted(set(datadump.keys()) - set(iface_keys)): 857 output += "%-10s: %s\n" % (key, format_yaml_value(datadump[key])) 858 if key == 'rdr_rules': 859 output += '%-10s:\n' % 'rdr_rules' 860 for rdr_rule in datadump[key]: 861 output += '- %s\n' % rdr_rule 862 else: 863 output += "%-10s: %s\n" % (key, format_yaml_value(datadump[key])) 858 864 859 865 output += "\n\n"
Note:
See TracChangeset
for help on using the changeset viewer.