Example #1
0
 def __init__(self, file='shorewall.conf'):
     ShorewallConf.__init__(self, file,
         r'^(?P<option>[^=]+)=(?P<value>.*)', '%s=%s')
     self.read()
Example #2
0
 def __init__(self, file='masq'):
     ShorewallConf.__init__(self, file,
         r'^(?P<lan_if>[\w]+)\s+(?P<wan_if>[\w]+)$')
     self.read()
Example #3
0
 def __init__(self, file='interfaces'):
     ShorewallConf.__init__(self, file,
         r'^(?P<zone>[\w]+)\s+(?P<if>[\w]+)\s*(?P<options>[\w,= ]+)?$')
     self.read()
Example #4
0
 def __init__(self):
     ShorewallConf.__init__(self, 'rules',
         r'^(?P<action>[\w\d/]+)\s+(?P<src>[\w\d:.]+)\s+(?P<dst>[\w\d:.]+)\s*(?P<proto>[\w\d]*)\s*(?P<dst_port>[:\w\d]*)')
     self.read()
Example #5
0
 def __init__(self, file='policy'):
     ShorewallConf.__init__(self, file,
         r'^(?P<src>[\w]+)\s+(?P<dst>[\w]+)\s+(?P<policy>ACCEPT|DROP|REJECT)\s*(?P<log>[\w]*)$')
     self.read()
Example #6
0
 def __init__(self, file='interfaces'):
     ShorewallConf.__init__(
         self, file,
         r'^(?P<zone>[\w]+)\s+(?P<if>[\w]+)\s*(?P<options>[\w,= ]+)?$')
     self.read()
Example #7
0
 def __init__(self):
     ShorewallConf.__init__(self, 'zones',
         r'^(?P<name>[\w\d]+)\s+(?P<type>[\w\d]+)')
     self.read()
Example #8
0
 def __init__(self):
     ShorewallConf.__init__(
         self, 'rules',
         r'^(?P<action>[\w\d/]+)\s+(?P<src>[\w\d:.,]+)\s+(?P<dst>[\w\d:.]+)\s*(?P<proto>[\w\d]*)\s*(?P<dst_port>[:\w\d]*)$'
     )
     self.read()
Example #9
0
 def __init__(self):
     ShorewallConf.__init__(self, 'masq',
         r'^(?P<lan_if>[\w]+)\s+(?P<wan_if>[\w]+)')
     self.read()
Example #10
0
 def __init__(self):
     ShorewallConf.__init__(self, 'shorewall.conf',
                            r'^(?P<option>[^=]+)=(?P<value>.*)', '%s=%s')
     self.read()
Example #11
0
 def __init__(self):
     ShorewallConf.__init__(self, 'zones',
                            r'^(?P<name>[\w\d]+)\s+(?P<type>[\w\d]+)$')
     self.read()
Example #12
0
 def __init__(self):
     ShorewallConf.__init__(
         self, 'interfaces',
         r'^(?P<zone>[\w]+)\s+(?P<if>[\w]+)\s+(?P<options>[\w,=]+)$')
     self.read()
Example #13
0
 def __init__(self):
     ShorewallConf.__init__(self, 'masq',
                            r'^(?P<lan_if>[\w]+)\s+(?P<wan_if>[\w]+)$')
     self.read()
Example #14
0
 def __init__(self):
     ShorewallConf.__init__(
         self, 'policy',
         r'^(?P<src>[\w]+)\s+(?P<dst>[\w]+)\s+(?P<policy>ACCEPT|DROP|REJECT)\s*(?P<log>[\w]*)$'
     )
     self.read()
Example #15
0
 def __init__(self, file='zones'):
     ShorewallConf.__init__(self, file,
         r'^(?P<name>[\w\d]+)\s+(?P<type>[\w\d]+)$')
     self.read()
Example #16
0
 def __init__(self):
     ShorewallConf.__init__(self, 'interfaces',
         r'^(?P<zone>[\w]+)\s+(?P<if>[\w]+)')
     self.read()
Example #17
0
 def __init__(self, file='rules'):
     ShorewallConf.__init__(self, file,
         r'^(?P<action>[\w\d/]+)\s+(?P<src>[\w\d:.,]+)\s+(?P<dst>[\w\d:.]+)\s*(?P<proto>[\w\d]*)\s*(?P<dst_port>[:,\d]*)$')
     self.read()
Example #18
0
 def __init__(self, file='rules'):
     ShorewallConf.__init__(
         self, file,
         r'^(?P<action>[\w\d/]+)\s+(?P<src>[\w\d:/!~.,-]+)\s+(?P<dst>[\w\d:/!~.,-]+)\s*(?P<proto>[\w\d]*)\s*(?P<dst_port>[:,\d]*)$'
     )
     self.read()