Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos
Commits
d353e318
Commit
d353e318
authored
Dec 07, 2018
by
Guillaume Hervier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/kvm: Small fix on UDP NAT rules
parent
f45c62c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+12
-2
software/kvm/software.cfg
software/kvm/software.cfg
+1
-1
No files found.
software/kvm/instance-kvm.cfg.jinja2
View file @
d353e318
...
...
@@ -184,8 +184,13 @@ hash-files = ${buildout:directory}/software_release/buildout.cfg
{% if use_nat == 'true' and nat_rule_list -%}
{% for port in nat_rule_list.split(' ') -%}
{% if ':' in port -%}
{% set proto, port = port.split(':') -%}
{% else -%}
{% set proto, port = 'tcp', port -%}
{% endif -%}
{% set external_port = 10000 + port|int() -%}
{% set section_name = '6tunnel-' ~ external_port -%}
{% set section_name = '6tunnel-' ~
proto ~ '-' ~
external_port -%}
[{{ section_name }}]
<= tunnel-6to4-base
ipv4-port = {{ external_port }}
...
...
@@ -419,8 +424,13 @@ maximum-extra-disk-amount = {{ disk_number }}
{% if nat_rule_list -%}
# Publish NAT port mapping status
{% for port in nat_rule_list.split(' ') -%}
{% if ':' in port -%}
{% set proto, port = port.split(':') -%}
{% else -%}
{% set proto, port = 'tcp', port -%}
{% endif -%}
{% set external_port = 10000 + port|int() -%}
nat-rule-port-{{p
ort}} = ${slap-network-information:global-ipv6} : ${6tunnel
-{{external_port}}:ipv6-port}
nat-rule-port-{{p
roto}}-{{port}} = ${slap-network-information:global-ipv6} : ${6tunnel-{{proto}}
-{{external_port}}:ipv6-port}
{% if slapparameter_dict.get('publish-nat-url', False) -%}
nat-rule-url-{{port}} = [${slap-network-information:global-ipv6}]:${6tunnel-{{external_port}}:ipv6-port}
{% endif -%}
...
...
software/kvm/software.cfg
View file @
d353e318
...
...
@@ -99,7 +99,7 @@ recipe = hexagonit.recipe.download
ignore-existing = true
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
md5sum =
149df1bc788ce68c86a5fda4872e008e
md5sum =
0668791e78430bafdec5300b4ea8d90a
download-only = true
on-update = true
...
...
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