Skip to main content

operate with nfacct/iptables

Project description

nfacct

pip3 install nfacct
$ nf --help
usage: nf [-h] [--in] [--out] [--noreverse] [-p [PROTO]]
          [-s [ADDR [ADDR ...]]] [-d [ADDR [ADDR ...]]]
          [--sport [SPORT [SPORT ...]]] [--dport [DPORT [DPORT ...]]]
          [-u USER] [--dry-run] [-l LEVEL] [--ip-args ARGS]
          [-e FILE [FILE ...]] [-c FILE [FILE ...]] [-v]
          {list,add,del,check,clear,init} [name]

nfacct and iptables

positional arguments:
  {list,add,del,check,clear,init}
                        list/add/del nfacct, or check requirements, add
                        default
  name                  nfacct name to add/del/list

optional arguments:
  -h, --help            show this help message and exit
  --in
  --out
  --noreverse
  -p [PROTO], --proto [PROTO]
                        port protocol
  -s [ADDR [ADDR ...]], --src-addr [ADDR [ADDR ...]]
                        source addr
  -d [ADDR [ADDR ...]], --dst-addr [ADDR [ADDR ...]]
                        dest addr
  --sport [SPORT [SPORT ...]]
                        source port
  --dport [DPORT [DPORT ...]]
                        dest port, support p1,p2,p3 or p1:p2
  -u USER, --user USER  program traffic owned by user[s]
  --dry-run             just print commands, not execute
  -l LEVEL, --level LEVEL
                        log level
  --ip-args ARGS        iptables extra args
  -e FILE [FILE ...], --env-file FILE [FILE ...]
                        load environment variables from env_file, default .env
  -c FILE [FILE ...], --conf-file FILE [FILE ...]
                        load configuation from file, default config.yaml
  -v, --version         show program's version number and exit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nfacct-0.3.tar.gz (5.0 kB view hashes)

Uploaded source

Built Distribution

nfacct-0.3-py3-none-any.whl (18.1 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page