[caclmgrd] Add some default ACCEPT rules and lastly drop all incoming packets#4412
Merged
jleveque merged 6 commits intosonic-net:masterfrom May 11, 2020
jleveque:cacl_enhance
Merged
[caclmgrd] Add some default ACCEPT rules and lastly drop all incoming packets#4412jleveque merged 6 commits intosonic-net:masterfrom jleveque:cacl_enhance
jleveque merged 6 commits intosonic-net:masterfrom
jleveque:cacl_enhance
Conversation
lguohan
reviewed
Apr 15, 2020
lguohan
reviewed
Apr 15, 2020
lguohan
reviewed
Apr 15, 2020
lguohan
reviewed
Apr 15, 2020
lguohan
previously approved these changes
May 6, 2020
Contributor
Author
|
@lguohan: Can you please review/approve again? I made a few minor changes to check for valid tables and make constant names more accurate. Thanks! |
lguohan
approved these changes
May 9, 2020
Contributor
Author
|
Removed labels requesting cherry-picks into release branches until tested and verified. |
Contributor
Author
|
This PR introduces a bug which is fixed in #4581 |
abdosi
pushed a commit
that referenced
this pull request
Jun 3, 2020
… packets (#4412) Modified caclmgrd behavior to enhance control plane security as follows: Upon starting or receiving notification of ACL table/rule changes in Config DB: 1. Add iptables/ip6tables commands to allow all incoming packets from established TCP sessions or new TCP sessions which are related to established TCP sessions 2. Add iptables/ip6tables commands to allow bidirectional ICMPv4 ping and traceroute 3. Add iptables/ip6tables commands to allow bidirectional ICMPv6 ping and traceroute 4. Add iptables/ip6tables commands to allow all incoming Neighbor Discovery Protocol (NDP) NS/NA/RS/RA messages 5. Add iptables/ip6tables commands to allow all incoming IPv4 DHCP packets 6. Add iptables/ip6tables commands to allow all incoming IPv6 DHCP packets 7. Add iptables/ip6tables commands to allow all incoming BGP traffic 8. Add iptables/ip6tables commands for all ACL rules for recognized services (currently SSH, SNMP, NTP) 9. For all services which we did not find configured ACL rules, add iptables/ip6tables commands to allow all incoming packets for those services (allows the device to accept SSH connections before the device is configured) 10. Add iptables rules to drop all packets destined for loopback interface IP addresses 11. Add iptables rules to drop all packets destined for management interface IP addresses 12. Add iptables rules to drop all packets destined for point-to-point interface IP addresses 13. Add iptables rules to drop all packets destined for our VLAN interface gateway IP addresses 14. Add iptables/ip6tables commands to allow all incoming packets with TTL of 0 or 1 (This allows the device to respond to tools like tcptraceroute) 15. If we found control plane ACLs in the configuration and applied them, we lastly add iptables/ip6tables commands to drop all other incoming packets
yxieca
pushed a commit
that referenced
this pull request
Jun 9, 2020
… packets (#4412) Modified caclmgrd behavior to enhance control plane security as follows: Upon starting or receiving notification of ACL table/rule changes in Config DB: 1. Add iptables/ip6tables commands to allow all incoming packets from established TCP sessions or new TCP sessions which are related to established TCP sessions 2. Add iptables/ip6tables commands to allow bidirectional ICMPv4 ping and traceroute 3. Add iptables/ip6tables commands to allow bidirectional ICMPv6 ping and traceroute 4. Add iptables/ip6tables commands to allow all incoming Neighbor Discovery Protocol (NDP) NS/NA/RS/RA messages 5. Add iptables/ip6tables commands to allow all incoming IPv4 DHCP packets 6. Add iptables/ip6tables commands to allow all incoming IPv6 DHCP packets 7. Add iptables/ip6tables commands to allow all incoming BGP traffic 8. Add iptables/ip6tables commands for all ACL rules for recognized services (currently SSH, SNMP, NTP) 9. For all services which we did not find configured ACL rules, add iptables/ip6tables commands to allow all incoming packets for those services (allows the device to accept SSH connections before the device is configured) 10. Add iptables rules to drop all packets destined for loopback interface IP addresses 11. Add iptables rules to drop all packets destined for management interface IP addresses 12. Add iptables rules to drop all packets destined for point-to-point interface IP addresses 13. Add iptables rules to drop all packets destined for our VLAN interface gateway IP addresses 14. Add iptables/ip6tables commands to allow all incoming packets with TTL of 0 or 1 (This allows the device to respond to tools like tcptraceroute) 15. If we found control plane ACLs in the configuration and applied them, we lastly add iptables/ip6tables commands to drop all other incoming packets
abdosi
added a commit
to abdosi/sonic-mgmt
that referenced
this pull request
Jun 24, 2020
we have added ACCEPT rules for BGP packets as default. Because of this iptable rule added by qos_sai.yml get ignored because of lower priority and make test case fails since BGP packets impacts Buffer calcualtion assumption of testcase. Fix is to add iptable rule to Drop BGP Packet from test case as highest priority. Fix in py script also
abdosi
added a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Jun 25, 2020
we have added ACCEPT rules for BGP packets as default. Because of this iptable rule added by qos_sai.yml get ignored because of lower priority and make test case fails since BGP packets impacts Buffer calcualtion assumption of testcase. Fix is to add iptable rule to Drop BGP Packet from test case as highest priority. Fix in py script also
6 tasks
|
May I ask why the change in step xiii was made? Is it for a specific network environment? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
- What I did
Modified behavior to enhance device security as follows: