Created
July 4, 2023 03:27
-
-
Save vimagick/2ea71ca08dc7787ac5060043c27c3b79 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ufw status | awk '/telegram/ && /DENY FWD/{print $1}' | xargs -rt -n1 -I{} ufw route delete deny to {} | |
ufw status | awk '/telegram/ && /DENY OUT/{print $1}' | xargs -rt -n1 -I{} ufw rule delete deny out to {} | |
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw route insert 1 deny to {} comment telegram | |
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw rule insert 1 deny out to {} comment telegram |
Author
vimagick
commented
Jul 4, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment