Skip to content
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

On_start directive #51

Open
debuti opened this issue Sep 13, 2017 · 1 comment
Open

On_start directive #51

debuti opened this issue Sep 13, 2017 · 1 comment

Comments

@debuti
Copy link

debuti commented Sep 13, 2017

Since the most common use case for this project would be to enable and disable some rules in iptables i think it would be awesome to have a on_start directive to ensure that the traffic is blocked only if knockd is up and running. Im thinking something like

[options]
    UseSyslog
    on_start = iptables -P INPUT DROP

Thanks for the project, its awesome

PD. I know you could always do a crontab trick like @reboot sleep 60 && knock <ip> 50505 20202 60606 but this proposal is more elegant.

@o-jasper
Copy link

o-jasper commented Jul 25, 2018

Could also manually do this. In case of systemd, could make a modified version of /usr/lib/systemd/system/knockd.conf(edit: more likely .service). Probably could even make systemd aware that running the program is a precondition.(not sure what that's useful for)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants