mirror of
https://github.com/teddysun/across.git
synced 2025-01-19 06:19:35 +08:00
Update wireguard.sh
This commit is contained in:
parent
23b515b01f
commit
eef158bfb8
@ -369,7 +369,7 @@ set_firewall() {
|
|||||||
if [ "$(firewall-cmd --state | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "running" ]; then
|
if [ "$(firewall-cmd --state | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGK]//g")" = "running" ]; then
|
||||||
default_zone="$(firewall-cmd --get-default-zone)"
|
default_zone="$(firewall-cmd --get-default-zone)"
|
||||||
if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade)" = "no" ]; then
|
if [ "$(firewall-cmd --zone=${default_zone} --query-masquerade)" = "no" ]; then
|
||||||
_error_detect "firewall-cmd --zone=${default_zone} --add-masquerade"
|
_error_detect "firewall-cmd --permanent --zone=${default_zone} --add-masquerade"
|
||||||
fi
|
fi
|
||||||
if ! firewall-cmd --list-ports | grep -qw "${SERVER_WG_PORT}/udp"; then
|
if ! firewall-cmd --list-ports | grep -qw "${SERVER_WG_PORT}/udp"; then
|
||||||
_error_detect "firewall-cmd --permanent --zone=${default_zone} --add-port=${SERVER_WG_PORT}/udp"
|
_error_detect "firewall-cmd --permanent --zone=${default_zone} --add-port=${SERVER_WG_PORT}/udp"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user