Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Rust bindings for iptables

License

NotificationsYou must be signed in to change notification settings

yaa110/rust-iptables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crates.ioDocumentationBuildLicense

This crate provides bindings foriptables application in Linux (inspired bygo-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.

[dependencies]iptables ="*"

Getting started

1- Import the crateiptables and manipulate chains:

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 intests folder.

About

Rust bindings for iptables

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp