Skip to content

Commit

Permalink
patch add iptables rules for eth0 interface filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
gupurush authored and gupurush committed Jan 2, 2025
1 parent c0ca6d9 commit d131a47
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/caclmgrd
Original file line number Diff line number Diff line change
Expand Up @@ -791,6 +791,11 @@ class ControlPlaneAclManager(daemon_base.DaemonBase):
# Append the packet action as the jump target
rule_cmd += ["-j", "{}".format(rule_props["PACKET_ACTION"])]

if (dst_port not in self.ACL_SERVICES["NTP"]["dst_ports"] and
dst_port not in self.ACL_SERVICES["SNMP"]["dst_ports"] and
dst_port not in self.ACL_SERVICES["SSH"]["dst_ports"]):
rule_cmd = self.exclude_mgmt_port(rule_cmd)

iptables_cmds.append(self.iptables_cmd_ns_prefix[namespace] + rule_cmd)
num_ctrl_plane_acl_rules += 1

Expand Down

0 comments on commit d131a47

Please sign in to comment.