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

Flushing iptables on first run is causing ssh lockdown #88

Closed
sid255 opened this issue Aug 24, 2021 · 4 comments
Closed

Flushing iptables on first run is causing ssh lockdown #88

sid255 opened this issue Aug 24, 2021 · 4 comments
Labels

Comments

@sid255
Copy link

sid255 commented Aug 24, 2021

When I run this role on my remote servers, the first task of flushing iptables is causing ssh lockdown and disconnection. I had to add the default rules task before flushing to make it work. Is this normal behavior or am I doing something wrong?

@shk3bq4d
Copy link

shk3bq4d commented Nov 22, 2021

iptables -F

present both in:

is a command to never execute when your chains policies are different from ACCEPT. Can you confirm this is your case @sid255 ?

Maybe supporting a configurable default var firewall_flush_commands that defaults to current iptables -F with a README note that proposes to execute the following consecutive commands

iptables -w 45 -P INPUT ACCEPT; iptables -w 45 -P FORWARD ACCEPT; iptables -w 45 -P OUTPUT ACCEPT; iptables -w 45 -F

as a proposal for people in this situation would solve the problem?

edit: merge request #87, aiming to solve the specific case of interaction with docker daemon managed rules mentioned in #82, has an alternative proposal to disable the initial flush and systemd ExecStop altogether

shk3bq4d pushed a commit to shk3bq4d/ansible-role-firewall that referenced this issue Nov 23, 2021
shk3bq4d pushed a commit to shk3bq4d/ansible-role-firewall that referenced this issue Nov 23, 2021
shk3bq4d pushed a commit to shk3bq4d/ansible-role-firewall that referenced this issue Nov 23, 2021
shk3bq4d pushed a commit to shk3bq4d/ansible-role-firewall that referenced this issue Nov 23, 2021
@shk3bq4d shk3bq4d mentioned this issue Nov 23, 2021
@shk3bq4d
Copy link

ok, I've opened PR #89 as a proposal to fix this issue

@stale
Copy link

stale bot commented Feb 26, 2022

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Feb 26, 2022
@stale
Copy link

stale bot commented Mar 30, 2022

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

@stale stale bot closed this as completed Mar 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants