if (LOG.isDebugEnabled()) {
LOG.debug("Using iptables to add access for TCP/{} to {}", port, host);
}
List<String> commands = ImmutableList.of(
IptablesCommands.insertIptablesRule(Chain.INPUT, Protocol.TCP, port, Policy.ACCEPT));
int result = host.execCommands(String.format("Open iptables TCP/%d", port), commands);
if (result != 0) {
String msg = String.format("Error running iptables update for TCP/%d on %s", port, host);
LOG.error(msg);
throw new RuntimeException(msg);
}