Documentation ¶
Index ¶
- Constants
- Variables
- func AppendIptableRule(version, tableName, chainName, match, target string) error
- func ChainExists(version, tableName, chainName string) bool
- func CreateChain(version, tableName, chainName string) error
- func DeleteIptableRule(version, tableName, chainName, match, target string) error
- func InsertIptableRule(version, tableName, chainName, match, target string) error
- func RuleExists(version, tableName, chainName, match, target string) bool
- func RunCmd(version, params string) error
- type IPTableEntry
Constants ¶
View Source
const ( CNIInputChain = "AZURECNIINPUT" CNIOutputChain = "AZURECNIOUTPUT" )
cni iptable chains
View Source
const ( Input = "INPUT" Output = "OUTPUT" Forward = "FORWARD" Prerouting = "PREROUTING" Postrouting = "POSTROUTING" Swift = "SWIFT" Snat = "SNAT" Return = "RETURN" )
standard iptable chains
View Source
const ( Filter = "filter" Nat = "nat" Mangle = "mangle" )
Standard Table names
View Source
const ( Accept = "ACCEPT" Drop = "DROP" Masquerade = "MASQUERADE" )
target
View Source
const ( Insert = "I" Append = "A" Delete = "D" )
actions
View Source
const ( Established = "ESTABLISHED" Related = "RELATED" )
states
View Source
const ( V4 = "4" V6 = "6" )
View Source
const ( UDP = "udp" TCP = "tcp" )
known protocols
View Source
const (
AzureDNS = "168.63.129.16"
)
known IP's
View Source
const (
DNSPort = 53
)
known ports
Variables ¶
View Source
var (
DisableIPTableLock bool
)
Functions ¶
func AppendIptableRule ¶
Append iptable rule at end of iptable chain
func ChainExists ¶
check if iptable chain alreay exists
func CreateChain ¶
create new iptable chain under specified table name
func DeleteIptableRule ¶
Delete matched iptable rule
func InsertIptableRule ¶
Insert iptable rule at beginning of iptable chain
func RuleExists ¶
check if iptable rule alreay exists
Types ¶
type IPTableEntry ¶
func GetAppendIptableRuleCmd ¶
func GetAppendIptableRuleCmd(version, tableName, chainName, match, target string) IPTableEntry
func GetCreateChainCmd ¶
func GetCreateChainCmd(version, tableName, chainName string) IPTableEntry
func GetInsertIptableRuleCmd ¶
func GetInsertIptableRuleCmd(version, tableName, chainName, match, target string) IPTableEntry
Click to show internal directories.
Click to hide internal directories.