-
Notifications
You must be signed in to change notification settings - Fork 332
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ike-group: T4288 : close-action is missing in swanctl.conf #1251
Conversation
@@ -241,16 +241,12 @@ | |||
<format>hold</format> | |||
<description>Attempt to re-negotiate when matching traffic is seen</description> | |||
</valueHelp> | |||
<valueHelp> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will require a migration as is a valid option going back to 1.3 etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a migrator?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote these lines to the existing migration script src/migration-scripts/ipsec/5-to-6 but I don't know how to validate it :
Can you please guide me on how to validate it.
# Change the close-action options
if config.exists(base +['ike-group']):
for ike-group in config.list_nodes(base + ['ike-group']):
base_closeaction = base + ['ike-group', ike-group, 'close-action', 'clear']
config.delete(base_cloaseaction)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can test individual migration scripts by just executing this after changing the config version string.
https://docs.vyos.io/en/equuleus/debugging.html#config-migration-scripts
$ cp /config/config.boot /tmp
$ /usr/libexec/vyos/run-config-migration.py --virtual --set-vintage vyos /tmp/config.boot
$ src/migration-scripts/ipsec/5-to-6 /tmp/config.boot
Now inspect /tmp/config.boot
if it was altered correctly.
PRO-TIP
Something I do is that right before
try:
with open(file_name, 'w') as f:
f.write(config.to_string())
except OSError as e:
print(f'Failed to save the modified config: {e}')
exit(1)
I add the following two lines during development of the migrator:
print(config.to_string())
exit(1)
With this the altered config is not saved and you can re-run and debug your migrator until it's ready. Then remove those two lines again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added the migrator
close-action parameter is missing in the swanctl.conf file
Change Summary
close-action parameter is missing in the swanctl.conf file so added the parameter as per Strongswan guide.
Also changed the dead-peer-detection action from start to restart as per the following guide:
https://docs.strongswan.org/strongswan-docs/5.9/swanctl/swanctlConf.html
Types of changes
Related Task(s)
Component(s) name
vpn ipsec ike-group
Proposed changes
Existing template;
New template:
How to test
Checklist: