Skip to content

Commit

Permalink
fix(uat): remove sudo from linux iptables command
Browse files Browse the repository at this point in the history
  • Loading branch information
bgklika committed Jul 3, 2023
1 parent d0454ee commit 4c0d552
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public class NetworkUtilsLinux extends NetworkUtils {
private static final String DISABLE_OPTION = "--delete";
private static final String APPEND_OPTION = "-A";
private static final String IPTABLES_DROP_DPORT_EXTERNAL_ONLY_COMMAND_STR
= "sudo iptables %s INPUT -p tcp -s localhost --dport %s -j ACCEPT && "
+ "sudo iptables %s INPUT -p tcp --dport %s -j DROP && "
+ "sudo iptables %s OUTPUT -p tcp -d localhost --dport %s -j ACCEPT && "
+ "sudo iptables %s OUTPUT -p tcp --dport %s -j DROP";
= "iptables %s INPUT -p tcp -s localhost --dport %s -j ACCEPT && "
+ "iptables %s INPUT -p tcp --dport %s -j DROP && "
+ "iptables %s OUTPUT -p tcp -d localhost --dport %s -j ACCEPT && "
+ "iptables %s OUTPUT -p tcp --dport %s -j DROP";

@Override
public void disconnectMqtt() throws InterruptedException, IOException {
Expand Down

0 comments on commit 4c0d552

Please sign in to comment.