-
Notifications
You must be signed in to change notification settings - Fork 9
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
Strange issue with nftables #135
Comments
For now I'll revert back to iptables and monitor if dfw is working "normal" again. First notice: building a project with git is no longer killing dfw... |
Hm... do the DFW-logs you have provided stop at that exact line when it is no longer working, or did you simply stop copying at some point? I'm a bit confused as to why it would fail at that step, and the iptables-version wouldn't. With the iptables-version, are you using the regular If you have the chance, can you run DFW with For me DFW seems to be running just fine, although I am no longer running GitLab-builds directly on the same host, which means I don't have that many Docker events anymore -- this might be the cause of the issues somehow? One more thing: you can set the |
Thank you for taking time to look into it. I'm using the regular iptables backend (iptables version). log file: I managed to "crash" dfw and capture a log file. Since it contains sensitive data I won't put it online but I'm happy to send it to you if you wish. Please tell me how you want it. Many docker events: Thats possible, I'm running about 50 container on one host (a lab host). Burst-Timeout didn't help. One thing I noticed. Everything provided by dfw is down e.g. http and https but also other ports. It seems everything from wider_world_to_container.rules. |
Interesting, thanks for testing. You can send it to me via mail, pitkley@googlemail.com. You can also share it with me via Keybase, should you use it: https://keybase.io/pitkley. |
send you an email... |
Thank you, this will probably help. Quick question: when you reach this state of it not working, does the DFW-container itself die, or does it simply stop doing anything, although the DFW-container itself is still running? I'm wondering if there is some form of race-condition in the event-burst-handling, although I'm not sure how the nftables-solution would be susceptible to that while the iptables-solution apparently isn't. |
the container itself is still running, log file grows... |
Now I'm confused... maybe I didn't understand the initial error report correctly. You are saying that DFW is still running and still outputting logs, but your nftables-ruleset is mostly empty? Specifically, the mark/comment rules mentioned in your initial report are not there? If that is the case, I'll change the trace-logging to output the ruleset that is applied using |
Sorry, my initial report was somehow not very accurate... |
Hi @cybermcm, sorry that I didn't get back to you for so long, this issue totally slipped my mind... Anyway: after re-reading the issue, I think I understood the point you were trying to make. It might have been the case that the comment/marker-rules got overriden without being regenerated. DFW <1.2 only inspected the rules once on startup, which means that if the marker-rules were removed after DFW started, they would not added, even if they were missing. This would explain why the container was still running, but the wider-world-to-container rules seemed to stop working. I am currently working on DFW release v1.2 which reintegrates iptables as a supported firewall-backend. One of the changes I made during that is that DFW will now check the nftables ruleset every time it processes the rules, which means the marker-rules will be regenerated if they became absent since DFW started. You can find the latest release-candidate here: https://github.com/pitkley/dfw/releases/tag/1.2.0-rc.3. You can also get the Docker image from Docker Hub: If you stick with iptables, I'd still suggest upgrading to v1.2. You can find a guide on how to migrate here. 👍 |
Hi, thx for getting back to my problem. |
I was too curious to wait any longer. I converted my lab server to nftables, there is also a solution for fail2ban (crazy-max/docker-fail2ban#29).
still one little issue @pitkley but I'm sure there is a solution: but if expose port 993 in my compose file then nmap -p 993 mail.domain.com is working! |
Me again ;-)
I noticed a very strange behavior with the new nftables implementation. I'm running a gitlab docker instance on my lab server and every time I start a build process dfw log starts filling and finally dfw doesn't work anymore.
log:
I noticed that if dfw is "broken" the comments are missing from the ruleset, e.g.
Any idea what can be the cause, it never happened with iptables before
The text was updated successfully, but these errors were encountered: