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

feat: graceful shutdown #862

Merged
merged 2 commits into from
Mar 1, 2024
Merged

feat: graceful shutdown #862

merged 2 commits into from
Mar 1, 2024

Conversation

pheiduck
Copy link
Contributor

@pheiduck pheiduck commented Feb 21, 2024

Lint errors fixed
From @samart45 Tested by @samart45 and @pheiduck

Fixes: #795
Fixes: #835
Issue duplicate firewall rules if network mode "host" is used:

/app # iptables  -v -L -n --line-numbers | grep "51820"
7        0     0 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820
8        0     0 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820
6        5   880 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820
/app # iptables -v -L -n --line-numbers | grep "51821"
7       23  1380 ACCEPT     6    --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:51821

@pheiduck
Copy link
Contributor Author

Tested by me works as expected.

@pheiduck
Copy link
Contributor Author

If container is up:

raspberrypi4 ~ # iptables -v -L -n --line-numbers | grep "51821"
7      820 49200 ACCEPT     6    --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:51821
raspberrypi4 ~ # iptables -v -L -n --line-numbers | grep "51820"
7        0     0 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820
6        0     0 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820

If container is down:

raspberrypi4 ~ # iptables -v -L -n --line-numbers | grep "51821"
7      820 49200 ACCEPT     6    --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:51821
raspberrypi4 ~ # iptables -v -L -n --line-numbers | grep "51820"
6        0     0 ACCEPT     17   --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:51820

@pheiduck pheiduck force-pushed the feat-graceful-shutdown branch from 3a70b09 to 1aa2308 Compare February 22, 2024 20:50
@pheiduck pheiduck added this to the v12 milestone Feb 24, 2024
@pheiduck pheiduck force-pushed the feat-graceful-shutdown branch from 1aa2308 to 5a87aa5 Compare February 29, 2024 14:49
@pheiduck
Copy link
Contributor Author

@peterlewis please check this will also be merged tomorrow.

@pheiduck pheiduck force-pushed the feat-graceful-shutdown branch from 5a87aa5 to 31fa90d Compare March 1, 2024 13:10
@pheiduck pheiduck force-pushed the feat-graceful-shutdown branch from 31fa90d to a6d092d Compare March 1, 2024 13:26
@pheiduck pheiduck merged commit 04e6f50 into master Mar 1, 2024
3 checks passed
@pheiduck pheiduck deleted the feat-graceful-shutdown branch March 1, 2024 13:27
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

Successfully merging this pull request may close these issues.

When systemctl stop wg-easy, PostDown script is not working. wg0 iptable rules duplicated on every restart
2 participants