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

Firewall not starting on re-install #42

Open
julienloizelet opened this issue Aug 11, 2023 · 1 comment
Open

Firewall not starting on re-install #42

julienloizelet opened this issue Aug 11, 2023 · 1 comment
Assignees

Comments

@julienloizelet
Copy link
Collaborator

How to reproduce:

Install the plugin and enable agent and firewall, then save settings=> services should work (see status tab for example).

Then re-intall the plugin (I do with make OSVERSION=1400000 clean reinstall).

Once the plugin is re-install, it should have launch crowdsec and firewall service (because settings are already here and enabled for the 2 services)

BUT firewall is not started.

I see these error (maybe not related) in the firewall.log :

time="11-08-2023 03:13:29" level=info msg="Starting crowdsec-firewall-bouncer v0.0.28-rc3-freebsd-5afbe52"
time="11-08-2023 03:13:29" level=info msg="backend type : pf"
time="11-08-2023 03:13:29" level=info msg="pf table clean-up: /sbin/pfctl -t crowdsec_blacklists -T flush"
time="11-08-2023 03:13:29" level=error msg="Error while flushing table (/sbin/pfctl -t crowdsec_blacklists -T flush): exit status 255 --> pfctl: Table does not exist.\n"
time="11-08-2023 03:13:29" level=info msg="Checking pf table: crowdsec_blacklists"
time="11-08-2023 03:13:29" level=fatal msg="pf init failed: table crowdsec_blacklists doesn't exist"

If I save the settings again, the firewall starts well and log are :

time="11-08-2023 03:13:53" level=info msg="Starting crowdsec-firewall-bouncer v0.0.28-rc3-freebsd-5afbe52"
time="11-08-2023 03:13:53" level=info msg="backend type : pf"
time="11-08-2023 03:13:53" level=info msg="pf table clean-up: /sbin/pfctl -t crowdsec_blacklists -T flush"
time="11-08-2023 03:13:53" level=info msg="Checking pf table: crowdsec_blacklists"
time="11-08-2023 03:13:53" level=info msg="pf initiated for ipv4"
time="11-08-2023 03:13:53" level=info msg="pf table clean-up: /sbin/pfctl -t crowdsec6_blacklists -T flush"
time="11-08-2023 03:13:53" level=info msg="Checking pf table: crowdsec6_blacklists"
time="11-08-2023 03:13:53" level=info msg="pf initiated for ipv6"
@mmetc
Copy link
Collaborator

mmetc commented Aug 11, 2023

I think the reason is alias is created after we try to run the bouncer, will see how to fix that

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