Closed ghost closed 3 years ago
I reads this comment on digitalocean, and I wonder if it would be better with this functionality?
FYI, this was me from another account.
This is probably because the default policy of any of the chains was likely set to DROP/REJECT before the first execution of the role (probably you had some active rules before). I wrote a patch to fix it, pull request: #61
A solution before this pull request is merged is to manually perform this commands on the host before running the playbook by first time: iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT iptables -F
I have the same issue.
Another solution to avoid lockout would be something like this:
iptables -F && iptables -I INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
Can #61 or something similar be merged?
I'm also facing this problem. Please resolve this thanks!
Ran into the same issue. PR #61 resolves
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.
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.
When using this role, I get to
TASK [geerlingguy.firewall : Copy firewall script into place.]
and I have been locked out of the server on port 22 which ansible is using to run tasks.It seems that
TASK [geerlingguy.firewall : Flush iptables the first time playbook runs.]
is locking the server down to no open ports.