Skip to main content

iptables

Introduction

Native iptables is not friendly enough for most users. This module is trying to make Linux/Iptables working like security groups in cloud environments.

Scenarios

  • Service must be public facing, but still wants to block random bad ipaddress easily.
  • Scripting interface talking to iptables, be convenient like same thing in cloud.

Examples

To protect your personal web server
from pyiptables import securitygroup as sg

# Create a security group based on tcp/port, naming associated to your to-be-protected service.
sg.create_security_group(security_group_name='httpd', dst_port='80')

# Create, append/insert, rules based on source address, with action accept/reject/drop.
sg.create_security_group_rule(security_group_name='httpd', 
                              src_addr='1.2.3.0/24',
                              rule_action='insert',
                              packet_action='DROP')
sg.create_security_group_rule(security_group_name='httpd',
                              src_addr='2.3.4.0/24',
                              rule_action='insert',
                              packet_action='DROP')

# List current rules for a given security group.
sg.list_security_group_rules(security_group_name='httpd')

# Delete a given rule for a security group.
sg.delete_security_group_rule(security_group_name='httpd', rule_id='HTTPD_kfnsznwvb0mzn3uh')

# Delete a given security group and its rules completely.
sg.delete_security_group(security_group_name='httpd')

Metadata

Release files for pyiptables 2.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyiptables 2.0.7
File Size Uploaded Provenance Actions
pyiptables-2.0.7.tar.gz 2.9 kB Without provenance Details for pyiptables-2.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyiptables 2.0.7
File Interpreter ABI Platform Actions
pyiptables-2.0.7-py3-none-any.whl Python 3 none any Details for pyiptables-2.0.7-py3-none-any.whl

Total release size: 6.2 kB

Release files / pyiptables-2.0.7.tar.gz

Download URL pyiptables-2.0.7.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
323d75e43a95007cf4945e75eeb0f029b2e1aeda3ddf15f08da022ce189c424c
BLAKE2b-256 checksum
How to use checksums
778f44f6f01a111d2e863ea437c3855836e85cd6eb5568a93f96173449e15ea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Release files / pyiptables-2.0.7-py3-none-any.whl

Download URL pyiptables-2.0.7-py3-none-any.whl
Size 3.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1f192b15b1bb627a2232e17b3defe34ec691980138d53ade897682f8739d027
BLAKE2b-256 checksum
How to use checksums
8373a93d913efb25a1cb4e0373366862dc65c5f0ab4baaa2589001c3b5e3eb5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.9.19

Security for pyiptables 2.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page