asn2pf

package module
v0.1.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2023 License: BSD-3-Clause Imports: 13 Imported by: 0

README

OVERVIEW

Go Reference Go Report Card Go Build

paepcke.de/asn2pf

Dynamicly generate optimized firewall tables based on the full internet bgp prefix & asn tables. Process data from Source: iptoasn.com

INSTALL

go install paepcke.de/asn2pf/cmd/asn2pf@latest
DOWNLOAD (prebuild)

github.com/paepckehh/asn2pf/releases

WHY ?

  • Your Amazon dot should be able to communicate with the <amazon_aws>, but no other internet [network|server|service]?
  • Your iPhone should be able to communicate with the <apple_icloud>, but not with any of the <facebook_asn> [networks|server]?
  • Non of your devices should communicate with:
    • declard but usually not connected, but often abused (US Department of Defense) network ranges?
    • china great firewall <country_cn> networks?
    • rfc1918 networks [private|martians|bogon] [asn:0] via your ISP uplink?
  • you want to [silently] [log|limit|stat] all your traffic with a specific full asn for pcap [analysis|decrypt|proof]?
  • your chatty TV should only allowed to communicate with <netflix_ipv6>, via a specific [ISP|route|limit]?
  • your smtp mail server takes no interest in offerings from <country_ru> <country_in> [unasked] inbound connects?

You already tried [< random dns blocker >] ?

  • Industrie already adapted to this via 'securing' the DNS service (DoT/DoH/...).

DETAILS

  • Supports any pf based firwall: macos, openbsd, freebsd, netbsd, pfsense, opensense, network focused linux distros.
  • Fast (parses more than One Million prefixes in millisecons).
  • Produces optimized tables for building with pf an optimal radix tree.
  • 100 % pure golang, simple, easy to review code

SHOWTIME

asn2pf block drop log facebook amazon rfc1918 dod country:cn country:ru asn:13335
[...]

TODO:

  • split and migrate prefix and asn table sources from all original authoritative creator sources (arin, ...)
  • use the asn radix tree package also for serialized/compresses/storage/published intermeds

DOCS

pkg.go.dev/paepcke.de/asn2pf

CONTRIBUTION

Yes, Please! PRs Welcome!

Documentation

Overview

package asn2pf produces pf firewall files from iptoasn.com tables

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTables

func GenerateTables(file, store string, fetch, noip4, noip6 bool, cmd_terms []string, skiplist string)

GenerateTables ...

Types

This section is empty.

Directories

Path Synopsis
package ansfetch validates, converts and fetchs missing asn db source files
package ansfetch validates, converts and fetchs missing asn db source files
cmd
asn2pf
package main ...
package main ...
2022/01/20 paepcke.de/internal/range2cidr forked as [minimal|static|fast|boiled-down|optimized|single-purpose] import-only!
2022/01/20 paepcke.de/internal/range2cidr forked as [minimal|static|fast|boiled-down|optimized|single-purpose] import-only!

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL