Skip to content

instructions/guidance for adding a drop everything else #8

Answered by bmcdonough
bmcdonough asked this question in Q&A
Discussion options

You must be logged in to vote

What specifically worked for me... was to add a country/countries to be dropped.
Google Cloud is charging for egress to China. I am not specifically discriminating but limiting my costs.

$ cat /etc/nftables.conf
#!/usr/bin/nft -f

flush ruleset

# Include all country code set files to make things easier to configure.
# nftables >= v0.9.4 can include all sets with: include "/etc/nftables/geo-nft/countrysets/*"
include "/etc/nftables/geo-nft/include-all.ipv4"
###include "/etc/nftables/geo-nft/include-all.ipv6"

table netdev filter {

  set geo-netdev4 {
    type ipv4_addr
    flags interval
    # Add IPv4 country code elements for the United States.
    elements = { $US.ipv4 }
  }
  set dro…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bmcdonough
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants