Brooklyn

brooklyn.util.ssh
[Java] Class IptablesCommands

java.lang.Object
  brooklyn.util.ssh.IptablesCommands

public class IptablesCommands

Nested Class Summary
enum IptablesCommands.Chain

enum IptablesCommands.Policy

enum IptablesCommands.Protocol

 
Method Summary
static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, IptablesCommands.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)

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 insertIptablesRule(IptablesCommands.Chain chain, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)

static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)

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()

static java.lang.String saveIptablesRules()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(), java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Method Detail

appendIptablesRule

public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
Returns the command that appends a rule to iptables to all interfaces.
Returns:
Returns the command that appends a rule to iptables.


appendIptablesRule

public static java.lang.String appendIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)
Returns the command that appends a rule to iptables.
Returns:
Returns the command that appends a rule to iptables.


cleanUpIptablesRules

public static java.lang.String cleanUpIptablesRules()
Returns the command that cleans up iptables rules.
Returns:
Returns the command that cleans up iptables rules.


insertIptablesRule

public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)


insertIptablesRule

public static java.lang.String insertIptablesRule(IptablesCommands.Chain chain, java.lang.String networkInterface, IptablesCommands.Protocol protocol, int port, IptablesCommands.Policy policy)


iptablesService

/**
public static java.lang.String iptablesService(java.lang.String cmd)


iptablesServiceRestart

return iptablesService("restart");
    }
public static java.lang.String iptablesServiceRestart()


iptablesServiceStart

public static String iptablesServiceStart() {
        return iptablesService("start");
public static java.lang.String iptablesServiceStart()


iptablesServiceStatus

}
public static java.lang.String iptablesServiceStatus()


iptablesServiceStop

@Beta // implementation not portable across distros
    public static String iptablesServiceStop() {
public static java.lang.String iptablesServiceStop()


listIptablesRule

public static java.lang.String listIptablesRule()


saveIptablesRules

public static java.lang.String saveIptablesRules()


 

Brooklyn Multi-Cloud Application Management Platform
brooklyncentral.github.com. Apache License. © 2012.