Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
048d3e30
authored
Aug 12, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
firewall: dmz fixes
parent
165e1b30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
circle/firewall/fw.py
+6
-3
circle/firewall/models.py
+4
-0
No files found.
circle/firewall/fw.py
View file @
048d3e30
...
...
@@ -192,9 +192,12 @@ def generate_ptr_records():
for
host
in
Host
.
objects
.
order_by
(
'vlan'
)
.
all
():
template
=
host
.
vlan
.
reverse_domain
i
=
host
.
get_external_ipv4
()
.
words
reverse
=
(
host
.
reverse
if
host
.
reverse
not
in
[
None
,
''
]
else
host
.
get_fqdn
())
if
not
host
.
shared_ip
and
host
.
external_ipv4
:
# DMZ
i
=
host
.
external_ipv4
.
words
reverse
=
host
.
get_hostname
(
'ipv4'
,
public
=
True
)
else
:
i
=
host
.
ipv4
.
words
reverse
=
host
.
get_hostname
(
'ipv4'
,
public
=
False
)
# ipv4
if
host
.
ipv4
:
...
...
circle/firewall/models.py
View file @
048d3e30
...
...
@@ -575,6 +575,10 @@ class Host(models.Model):
# IPv4
if
self
.
ipv4
is
not
None
:
if
not
self
.
shared_ip
and
self
.
external_ipv4
:
# DMZ
ipv4
=
self
.
external_ipv4
else
:
ipv4
=
self
.
ipv4
# update existing records
affected_records
=
Record
.
objects
.
filter
(
host
=
self
,
name
=
self
.
hostname
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment