Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rust-iptables

> 编程语言
Open source

Rust bindings for iptables

99 stars0 likes1 views
WebsiteGitHub

About

Rust bindings for iptables

Rust iptables

This crate provides bindings for iptables application in Linux (inspired by go-iptables). This crate uses iptables binary to manipulate chains and tables. This source code is licensed under MIT license that can be found in the LICENSE file.

toml
[dependencies]
iptables = "*"

Getting started

1- Import the crate iptables and manipulate chains:

rust
let ipt = iptables::new(false).unwrap();

assert!(ipt.new_chain("nat", "NEWCHAINNAME").is_ok());
assert!(ipt.append("nat", "NEWCHAINNAME", "-j ACCEPT").is_ok());
assert!(ipt.exists("nat", "NEWCHAINNAME", "-j ACCEPT").unwrap());
assert!(ipt.delete("nat", "NEWCHAINNAME", "-j ACCEPT").is_ok());
assert!(ipt.delete_chain("nat", "NEWCHAINNAME").is_ok());

For more information, please check the test file in tests folder.

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustbindingsiptablesnetfilterrust

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言