Created
December 9, 2016 16:36
-
-
Save paulperegud/de1d572218e4a7f84e194b501bcfc4dd 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
#!/usr/sbin/nft -f | |
# to list rules: nft list table t | |
# to remove rules: nft flush table t | |
define nodes = { 200.69.141.134, 52.40.149.71, 45.32.83.15 } | |
add table t | |
add chain ip t input { type filter hook input priority 0; policy accept; } | |
add rule t input ip daddr $nodes drop | |
add chain ip t output { type filter hook output priority 0; policy accept; } | |
add rule t output ip daddr $nodes drop | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment