FIrst Commit
This commit is contained in:
commit
59a3d0375c
10
main.py
Normal file
10
main.py
Normal file
@ -0,0 +1,10 @@
|
||||
with open("natconfig.xml") as f:
|
||||
ruletemp = dict()
|
||||
ruleList = dict()
|
||||
rulebit = False
|
||||
|
||||
## Loop through config
|
||||
for line in f:
|
||||
if "<rule>" in line:
|
||||
rulebit = True
|
||||
if rulebit
|
||||
584
natconfig.xml
Normal file
584
natconfig.xml
Normal file
@ -0,0 +1,584 @@
|
||||
|
||||
<nat>
|
||||
<outbound>
|
||||
<mode>automatic</mode>
|
||||
</outbound>
|
||||
<separator></separator>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>5060</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>10.0.5.13</target>
|
||||
<local-port>5060</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[PN FreePBX]]></descr>
|
||||
<associated-rule-id>nat_6035d0aa8e84c8.83962673</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<updated>
|
||||
<time>1614139562</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1614139562</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</created>
|
||||
<disabled></disabled>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>5160</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>10.0.5.13</target>
|
||||
<local-port>5160</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[PN FreePBX]]></descr>
|
||||
<associated-rule-id>nat_6053ca024e5f58.59668916</associated-rule-id>
|
||||
<natreflection>purenat</natreflection>
|
||||
<created>
|
||||
<time>1616103938</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1616105290</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
<disabled></disabled>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>15000-20000</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>10.0.5.13</target>
|
||||
<local-port>15000</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[PN FreePBX]]></descr>
|
||||
<associated-rule-id>nat_6053ca905394f0.58589865</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<created>
|
||||
<time>1616104080</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1616104722</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
<disabled></disabled>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>5000</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.25</target>
|
||||
<local-port>5000</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[LOVEBOX API]]></descr>
|
||||
<associated-rule-id>nat_5fdfbc9883e092.40322221</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<created>
|
||||
<time>1608498328</time>
|
||||
<username><![CDATA[admin@192.168.0.16 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1616983521</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>2222</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.25</target>
|
||||
<local-port>2222</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[HONEYPOT]]></descr>
|
||||
<associated-rule-id>nat_5fdd11937c15e6.95214682</associated-rule-id>
|
||||
<created>
|
||||
<time>1608323475</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1611513431</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>22</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.25</target>
|
||||
<local-port>2222</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[HONEYPOT2]]></descr>
|
||||
<associated-rule-id>nat_5ffe36cdb85b29.18219832</associated-rule-id>
|
||||
<created>
|
||||
<time>1610495693</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1611446915</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8455</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.167</target>
|
||||
<local-port>8455</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[DEV Lxc]]></descr>
|
||||
<associated-rule-id>nat_5fd54863ef7552.51315082</associated-rule-id>
|
||||
<created>
|
||||
<time>1607813219</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1607820058</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>18388</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.16</target>
|
||||
<local-port>18388</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[LocalTraffic VPN]]></descr>
|
||||
<associated-rule-id>nat_5f8252eddb5d82.12468095</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<created>
|
||||
<time>1602376429</time>
|
||||
<username><![CDATA[admin@192.168.0.16 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1607383611</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8880</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.17</target>
|
||||
<local-port>8880</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Unifi5]]></descr>
|
||||
<associated-rule-id>nat_5f7fdad6c08780.96214355</associated-rule-id>
|
||||
<created>
|
||||
<time>1602214614</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1602214987</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8843</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.17</target>
|
||||
<local-port>8843</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Unifi4]]></descr>
|
||||
<associated-rule-id>nat_5f7fda9cad4c37.81299563</associated-rule-id>
|
||||
<created>
|
||||
<time>1602214556</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1602215050</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8080</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.17</target>
|
||||
<local-port>8080</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Unifi3]]></descr>
|
||||
<associated-rule-id>nat_5f7fda257f3928.12094779</associated-rule-id>
|
||||
<updated>
|
||||
<time>1602214437</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1602214437</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8443</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.17</target>
|
||||
<local-port>8443</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Unifi2]]></descr>
|
||||
<associated-rule-id>nat_5f7fd9f93f94e6.47847118</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<created>
|
||||
<time>1602214393</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1602215224</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>3478</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>192.168.0.17</target>
|
||||
<local-port>3478</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Unifi1]]></descr>
|
||||
<associated-rule-id>nat_5f7fd9b7692056.15314261</associated-rule-id>
|
||||
<created>
|
||||
<time>1602214327</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1602214995</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>32700</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.90</target>
|
||||
<local-port>32400</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[James Plex]]></descr>
|
||||
<associated-rule-id>nat_5f7fd28b14a6b3.57176874</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<updated>
|
||||
<time>1602212491</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1602212491</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>15628</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>192.168.0.16</target>
|
||||
<local-port>15628</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Roomate VPN]]></descr>
|
||||
<associated-rule-id>nat_5f7fcaf5e7da95.97069904</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<updated>
|
||||
<time>1602210549</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1602210549</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>443</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>10.0.5.10</target>
|
||||
<local-port>443</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[HTTPS Loadbalancer]]></descr>
|
||||
<associated-rule-id>nat_5f78170db44841.94551776</associated-rule-id>
|
||||
<created>
|
||||
<time>1601705741</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1610323644</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>18388</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>192.168.0.16</target>
|
||||
<local-port>18388</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[LocalTraffic VPN]]></descr>
|
||||
<associated-rule-id>nat_5f71838a243c97.70806433</associated-rule-id>
|
||||
<updated>
|
||||
<time>1601274762</time>
|
||||
<username><![CDATA[admin@192.168.0.209 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1601274762</time>
|
||||
<username><![CDATA[admin@192.168.0.209 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>8005</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.5</target>
|
||||
<local-port>8006</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[PROX2BACKUP]]></descr>
|
||||
<associated-rule-id>nat_5f71800937b828.03230495</associated-rule-id>
|
||||
<natreflection>disable</natreflection>
|
||||
<updated>
|
||||
<time>1601273865</time>
|
||||
<username><![CDATA[admin@192.168.0.209 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1601273865</time>
|
||||
<username><![CDATA[admin@192.168.0.209 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>32400</port>
|
||||
</destination>
|
||||
<protocol>tcp/udp</protocol>
|
||||
<target>192.168.0.8</target>
|
||||
<local-port>32400</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Sean Plex]]></descr>
|
||||
<associated-rule-id>nat_5f7818b8941264.54217870</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<updated>
|
||||
<time>1601706168</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1601706168</time>
|
||||
<username><![CDATA[admin@192.168.0.112 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
</destination>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>32600</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.41</target>
|
||||
<local-port>32400</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[Justin Plex]]></descr>
|
||||
<associated-rule-id>nat_5fe2b7214e7703.50536588</associated-rule-id>
|
||||
<natreflection>enable</natreflection>
|
||||
<created>
|
||||
<time>1608693537</time>
|
||||
<username><![CDATA[admin@192.168.0.16 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1611183663</time>
|
||||
<username><![CDATA[admin@192.168.0.188 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>444</port>
|
||||
</destination>
|
||||
<protocol>tcp</protocol>
|
||||
<target>192.168.0.16</target>
|
||||
<local-port>443</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr></descr>
|
||||
<associated-rule-id>nat_5fe3d560a0aeb7.20483941</associated-rule-id>
|
||||
<created>
|
||||
<time>1608766816</time>
|
||||
<username><![CDATA[admin@192.168.0.16 (Local Database)]]></username>
|
||||
</created>
|
||||
<updated>
|
||||
<time>1608767059</time>
|
||||
<username><![CDATA[admin@192.168.0.16 (Local Database)]]></username>
|
||||
</updated>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>15961</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>10.0.100.4</target>
|
||||
<local-port>15961</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[James VPN]]></descr>
|
||||
<associated-rule-id>nat_6064d62a359848.37076292</associated-rule-id>
|
||||
<natreflection>purenat</natreflection>
|
||||
<updated>
|
||||
<time>1617221162</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1617221162</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>10333</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>10.0.100.4</target>
|
||||
<local-port>10333</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[James VPN]]></descr>
|
||||
<associated-rule-id>nat_6064d645c67f04.30447230</associated-rule-id>
|
||||
<natreflection>purenat</natreflection>
|
||||
<updated>
|
||||
<time>1617221189</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1617221189</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
<rule>
|
||||
<source>
|
||||
<any></any>
|
||||
</source>
|
||||
<destination>
|
||||
<network>wanip</network>
|
||||
<port>14286</port>
|
||||
</destination>
|
||||
<protocol>udp</protocol>
|
||||
<target>10.0.100.4</target>
|
||||
<local-port>14286</local-port>
|
||||
<interface>wan</interface>
|
||||
<descr><![CDATA[James VPN]]></descr>
|
||||
<associated-rule-id>nat_6064d65744b485.38915272</associated-rule-id>
|
||||
<natreflection>purenat</natreflection>
|
||||
<updated>
|
||||
<time>1617221207</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</updated>
|
||||
<created>
|
||||
<time>1617221207</time>
|
||||
<username><![CDATA[admin@10.0.5.46 (Local Database)]]></username>
|
||||
</created>
|
||||
</rule>
|
||||
</nat>
|
||||
Loading…
Reference in New Issue
Block a user