summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/templates/openvpn/server.conf.j22
-rwxr-xr-xsrc/migration-scripts/firewall/12-to-132
-rwxr-xr-xsrc/migration-scripts/policy/6-to-72
3 files changed, 3 insertions, 3 deletions
diff --git a/data/templates/openvpn/server.conf.j2 b/data/templates/openvpn/server.conf.j2
index 746155c37..c02411904 100644
--- a/data/templates/openvpn/server.conf.j2
+++ b/data/templates/openvpn/server.conf.j2
@@ -79,7 +79,7 @@ server {{ subnet | address_from_cidr }} {{ subnet | netmask_from_cidr }} {{ 'nop
{% if server.push_route is vyos_defined %}
{% for route, route_config in server.push_route.items() %}
{% if route | is_ipv4 %}
-push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }} {{ subnet | first_host_address ~ ' ' ~ route_config.metric if route_config.metric is vyos_defined }}"
+push "route {{ route | address_from_cidr }} {{ route | netmask_from_cidr }} {{ 'vpn_gateway' ~ ' ' ~ route_config.metric if route_config.metric is vyos_defined }}"
{% elif route | is_ipv6 %}
push "route-ipv6 {{ route }}"
{% endif %}
diff --git a/src/migration-scripts/firewall/12-to-13 b/src/migration-scripts/firewall/12-to-13
index c2b34b2d8..4eaae779b 100755
--- a/src/migration-scripts/firewall/12-to-13
+++ b/src/migration-scripts/firewall/12-to-13
@@ -70,7 +70,7 @@ for family in ['ipv4', 'ipv6', 'bridge']:
state_value = config.return_value(base + [family, hook, priority, 'rule', rule, 'state', state])
config.delete(base + [family, hook, priority, 'rule', rule, 'state', state])
if state_value == 'enable':
- config.set(base + [family, hook, priority, 'rule', rule, 'state', state])
+ config.set(base + [family, hook, priority, 'rule', rule, 'state'], value=state, replace=False)
flag_enable = 'True'
if flag_enable == 'False':
config.delete(base + [family, hook, priority, 'rule', rule, 'state'])
diff --git a/src/migration-scripts/policy/6-to-7 b/src/migration-scripts/policy/6-to-7
index 1f955aa02..727b8487a 100755
--- a/src/migration-scripts/policy/6-to-7
+++ b/src/migration-scripts/policy/6-to-7
@@ -66,7 +66,7 @@ for family in ['route', 'route6']:
state_value = config.return_value(base + [family, policy_name, 'rule', rule, 'state', state])
config.delete(base + [family, policy_name, 'rule', rule, 'state', state])
if state_value == 'enable':
- config.set(base + [family, policy_name, 'rule', rule, 'state', state])
+ config.set(base + [family, policy_name, 'rule', rule, 'state'], value=state, replace=False)
flag_enable = 'True'
if flag_enable == 'False':
config.delete(base + [family, policy_name, 'rule', rule, 'state'])