weizhouapache commented on code in PR #8530:
URL: https://github.com/apache/cloudstack/pull/8530#discussion_r1457683933
##########
services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResource.java:
##########
@@ -2290,6 +2290,12 @@ public synchronized String allowOutgoingOnPrivate(String
destCidr) {
Script command = new Script("/bin/bash", s_logger);
String intf = "eth1";
command.add("-c");
+ command.add("iptables -D OUTPUT -o " + intf + " -d " + destCidr + " -p
tcp -m state --state NEW -m tcp -j ACCEPT");
Review Comment:
@DaanHoogland
my idea is
- check if the rule exists by command `iptables-save |grep "<command>"`
- if exist, do nothing and return
- if not exist, insert the rule
it looks better than `-D` and then `-I`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]