Package io.fabric8.service.jclouds.firewall

Examples of io.fabric8.service.jclouds.firewall.FirewallManager.addRules()


            if (firewallManager.isSupported()) {
                listener.onStateChange("Configuring firewall.");
                String source = getOriginatingIp();

                Rule httpRule = Rule.create().source("0.0.0.0/0").destination(nodeMetadata).port(8181);
                firewallManager.addRules(httpRule);

                if (source != null) {
                    Rule jmxRule = Rule.create().source(source).destination(nodeMetadata).ports(44444, 1099);
                    Rule sshRule = Rule.create().source(source).destination(nodeMetadata).port(8101);
                    Rule zookeeperRule = Rule.create().source(source).destination(nodeMetadata).port(2181);
View Full Code Here


                if (source != null) {
                    Rule jmxRule = Rule.create().source(source).destination(nodeMetadata).ports(44444, 1099);
                    Rule sshRule = Rule.create().source(source).destination(nodeMetadata).port(8101);
                    Rule zookeeperRule = Rule.create().source(source).destination(nodeMetadata).port(2181);
                    firewallManager.addRules(jmxRule, sshRule, zookeeperRule);
                }
                //We do add the target node public address to the firewall rules, as a way to make things easier in cases
                //where firewall configuration is shared among nodes of the same groups, e.g. EC2.
                if (!Strings.isNullOrEmpty(publicAddress)) {
                    Rule zookeeperFromTargetRule = Rule.create().source(publicAddress + "/32").destination(nodeMetadata).port(2181);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.