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

Fallback to iptables-legacy if iptables doesn't work #491

Merged
merged 3 commits into from
Aug 7, 2024

Conversation

marblepebble
Copy link
Contributor

@marblepebble marblepebble commented Jul 1, 2024

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

Closes #476

On some systems 'iptables' gives an error. This implements the solution from https://github.com/crazy-max/docker-fail2ban ie. install iptables-legacy, and if iptables gives an error symlink iptables -> iptables-legacy.
This allows fail2ban to work. I was hitting this problem and this resolved it for me.

Benefits of this PR and context:

Fixes broken fail2ban on some systems.

How Has This Been Tested?

I ran with this fix with a Qnap host. I can docker exec -it swag /bin/sh and see banned ips with 'iptable -L -n' now - previously it would just give an error.

Source / References:

See issue #476 and the crazy-max fail2ban image.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-905bd5b6-dev-625b11d21c994324e8d2ce89adedd04313c2937e-pr-491/index.html
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-905bd5b6-dev-625b11d21c994324e8d2ce89adedd04313c2937e-pr-491/shellcheck-result.xml

Tag Passed
amd64-2.11.0-pkg-905bd5b6-dev-625b11d21c994324e8d2ce89adedd04313c2937e-pr-491
arm64v8-2.11.0-pkg-905bd5b6-dev-625b11d21c994324e8d2ce89adedd04313c2937e-pr-491

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-b36b718b-dev-a687d85cf97af41522ea5ed2661f377e8654b37c-pr-491/index.html
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-b36b718b-dev-a687d85cf97af41522ea5ed2661f377e8654b37c-pr-491/shellcheck-result.xml

Tag Passed
amd64-2.11.0-pkg-b36b718b-dev-a687d85cf97af41522ea5ed2661f377e8654b37c-pr-491
arm64v8-2.11.0-pkg-b36b718b-dev-a687d85cf97af41522ea5ed2661f377e8654b37c-pr-491

@drizuid drizuid requested a review from a team July 30, 2024 17:29
Copy link
Member

@thespad thespad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs the aarch64 Dockerfile updating as well

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-df74b1eb-dev-20bbf040e0967e718adfdbeb1bb0b2396b01a34b-pr-491/index.html
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-df74b1eb-dev-20bbf040e0967e718adfdbeb1bb0b2396b01a34b-pr-491/shellcheck-result.xml

Tag Passed
amd64-2.11.0-pkg-df74b1eb-dev-20bbf040e0967e718adfdbeb1bb0b2396b01a34b-pr-491
arm64v8-2.11.0-pkg-df74b1eb-dev-20bbf040e0967e718adfdbeb1bb0b2396b01a34b-pr-491

@marblepebble marblepebble requested a review from thespad July 30, 2024 20:52
@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-e9202f75-dev-4e93ec1ce1a5256047e5701d10cb252d68191d9e-pr-491/index.html
https://ci-tests.linuxserver.io/lspipepr/swag/2.11.0-pkg-e9202f75-dev-4e93ec1ce1a5256047e5701d10cb252d68191d9e-pr-491/shellcheck-result.xml

Tag Passed
amd64-2.11.0-pkg-e9202f75-dev-4e93ec1ce1a5256047e5701d10cb252d68191d9e-pr-491
arm64v8-2.11.0-pkg-e9202f75-dev-4e93ec1ce1a5256047e5701d10cb252d68191d9e-pr-491

@drizuid
Copy link
Member

drizuid commented Aug 7, 2024

tested as functional by discord user: https://discord.com/channels/354974912613449730/1269985663881711627 leveraging the fallback to legacy.

tested by me on a system not needing the fallback to legacy. it stayed on iptabled 1.8.10 nf_tables rather than legacy. no impact to functionality that I was able to see.

@drizuid drizuid merged commit 0357efe into linuxserver:master Aug 7, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[BUG] IPs are banned but can still access the server/apps
4 participants