public class IptablesCommands
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
IptablesCommands.Chain |
static class |
IptablesCommands.Policy |
static class |
IptablesCommands.Protocol
Deprecated.
since 0.7; use
Protocol |
Constructor and Description |
---|
IptablesCommands() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
addFirewalldRule(IptablesCommands.Chain chain,
com.google.common.base.Optional<java.lang.String> networkInterface,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that adds firewalld direct rule.
|
static java.lang.String |
addFirewalldRule(IptablesCommands.Chain chain,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that adds firewalld direct rule.
|
static java.lang.String |
addIptablesRule(java.lang.String direction,
IptablesCommands.Chain chain,
com.google.common.base.Optional<java.lang.String> networkInterface,
IptablesCommands.Protocol protocol,
int port,
IptablesCommands.Policy policy)
Deprecated.
|
static java.lang.String |
addIptablesRule(java.lang.String direction,
IptablesCommands.Chain chain,
com.google.common.base.Optional<java.lang.String> networkInterface,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that creates a rule to iptables.
|
static java.lang.String |
appendIptablesRule(IptablesCommands.Chain chain,
IptablesCommands.Protocol protocol,
int port,
IptablesCommands.Policy policy)
Deprecated.
since 0.7.0; use
appendIptablesRule(Chain, brooklyn.util.net.Protocol, int, Policy) |
static java.lang.String |
appendIptablesRule(IptablesCommands.Chain chain,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that appends a rule to iptables to all interfaces.
|
static java.lang.String |
appendIptablesRule(IptablesCommands.Chain chain,
java.lang.String networkInterface,
IptablesCommands.Protocol protocol,
int port,
IptablesCommands.Policy policy)
Deprecated.
|
static java.lang.String |
appendIptablesRule(IptablesCommands.Chain chain,
java.lang.String networkInterface,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that appends a rule to iptables.
|
static java.lang.String |
cleanUpIptablesRules()
Returns the command that cleans up iptables rules.
|
static java.lang.String |
firewalldService(java.lang.String cmd) |
static java.lang.String |
firewalldServiceIsActive() |
static java.lang.String |
firewalldServiceRestart() |
static java.lang.String |
firewalldServiceStart() |
static java.lang.String |
firewalldServiceStatus() |
static java.lang.String |
firewalldServiceStop() |
static java.lang.String |
insertIptablesRule(IptablesCommands.Chain chain,
IptablesCommands.Protocol protocol,
int port,
IptablesCommands.Policy policy)
Deprecated.
since 0.7.0; use
insertIptablesRule(Chain, brooklyn.util.net.Protocol, int, Policy) |
static java.lang.String |
insertIptablesRule(IptablesCommands.Chain chain,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that inserts a rule on top of the iptables' rules to all interfaces.
|
static java.lang.String |
insertIptablesRule(IptablesCommands.Chain chain,
java.lang.String networkInterface,
IptablesCommands.Protocol protocol,
int port,
IptablesCommands.Policy policy)
Deprecated.
|
static java.lang.String |
insertIptablesRule(IptablesCommands.Chain chain,
java.lang.String networkInterface,
Protocol protocol,
int port,
IptablesCommands.Policy policy)
Returns the command that inserts a rule on top of the iptables' rules.
|
static java.lang.String |
iptablesService(java.lang.String cmd) |
static java.lang.String |
iptablesServiceRestart() |
static java.lang.String |
iptablesServiceStart() |
static java.lang.String |
iptablesServiceStatus() |
static java.lang.String |
iptablesServiceStop() |
static java.lang.String |
listIptablesRule()
Returns the iptables rules.
|
static java.lang.String |
saveIptablesRules()
Returns the command that saves iptables rules on file.
|
@Beta public static java.lang.String iptablesService(java.lang.String cmd)
@Beta public static java.lang.String iptablesServiceStop()
@Beta public static java.lang.String iptablesServiceStart()
@Beta public static java.lang.String iptablesServiceRestart()
@Beta public static java.lang.String iptablesServiceStatus()
@Beta public static java.lang.String firewalldService(java.lang.String cmd)
@Beta public static java.lang.String firewalldServiceStop()
@Beta public static java.lang.String firewalldServiceStart()
@Beta public static java.lang.String firewalldServiceRestart()
@Beta public static java.lang.String firewalldServiceStatus()
@Beta public static java.lang.String firewalldServiceIsActive()
public static java.lang.String saveIptablesRules()
public static java.lang.String cleanUpIptablesRules()
public static java.lang.String listIptablesRule()
public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, Protocol protocol, int port, IptablesCommands.Policy policy)
@Deprecated public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
insertIptablesRule(Chain, brooklyn.util.net.Protocol, int, Policy)
public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, Protocol protocol, int port, IptablesCommands.Policy policy)
@Deprecated public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
insertIptablesRule(Chain, String, brooklyn.util.net.Protocol, int, Policy)
public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, Protocol protocol, int port, IptablesCommands.Policy policy)
@Deprecated public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
appendIptablesRule(Chain, brooklyn.util.net.Protocol, int, Policy)
public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, Protocol protocol, int port, IptablesCommands.Policy policy)
@Deprecated public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
appendIptablesRule(Chain, String, brooklyn.util.net.Protocol, int, Policy)
public static java.lang.String addIptablesRule(java.lang.String direction, IptablesCommands.Chain chain, com.google.common.base.Optional<java.lang.String> networkInterface, Protocol protocol, int port, IptablesCommands.Policy policy)
@Deprecated public static java.lang.String addIptablesRule(java.lang.String direction, IptablesCommands.Chain chain, com.google.common.base.Optional<java.lang.String> networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
addIptablesRule(String, Chain, Optional, brooklyn.util.net.Protocol, int, Policy)
public static java.lang.String addFirewalldRule(IptablesCommands.Chain chain, Protocol protocol, int port, IptablesCommands.Policy policy)
public static java.lang.String addFirewalldRule(IptablesCommands.Chain chain, com.google.common.base.Optional<java.lang.String> networkInterface, Protocol protocol, int port, IptablesCommands.Policy policy)