Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix private gateway acl on static routes #10262

Merged
merged 4 commits into from
Feb 10, 2025

Conversation

vishesh92
Copy link
Member

@vishesh92 vishesh92 commented Jan 24, 2025

Description

This PR fixes #9837

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@vishesh92
Copy link
Member Author

@blueorangutan package

@vishesh92 vishesh92 linked an issue Jan 24, 2025 that may be closed by this pull request
@vishesh92 vishesh92 linked an issue Jan 24, 2025 that may be closed by this pull request
Copy link

codecov bot commented Jan 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 15.15%. Comparing base (90c960e) to head (77fb01c).
Report is 13 commits behind head on 4.19.

Additional details and impacted files
@@             Coverage Diff              @@
##               4.19   #10262      +/-   ##
============================================
- Coverage     15.16%   15.15%   -0.01%     
- Complexity    11314    11318       +4     
============================================
  Files          5409     5409              
  Lines        474473   474663     +190     
  Branches      57876    57903      +27     
============================================
+ Hits          71947    71952       +5     
- Misses       394482   394666     +184     
- Partials       8044     8045       +1     
Flag Coverage Δ
uitests 4.29% <ø> (ø)
unittests 15.88% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@weizhouapache
Copy link
Member

@blueorangutan package

@DaanHoogland DaanHoogland added this to the 4.19.2 milestone Jan 24, 2025
@vishesh92
Copy link
Member Author

@blueorangutan test

@weizhouapache
Copy link
Member

iptables rules for ingress look good

-A FORWARD -d 10.200.0.0/24 -o eth2 -j ACL_INBOUND_eth2
-A FORWARD -d xx.xx.80.0/24 -o eth2 -j ACL_INBOUND_eth2
-A FORWARD -d xx.xx.81.0/24 -o eth2 -j ACL_INBOUND_eth2

however, the rules for egress seem wrong

-A PREROUTING -s 10.200.0.0/24 ! -d 10.200.0.1/32 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2
-A PREROUTING -s 10.200.0.0/24 ! -d xx.xx.80.0/24 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2
-A PREROUTING -s 10.200.0.0/24 ! -d xx.xx.81.0/24 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2

I think it should be like

-A PREROUTING -s 10.200.0.0/24 ! -d 10.200.0.4/32 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2
-A PREROUTING -s xx.xx.80.0/24 ! -d 10.200.0.4/32 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2
-A PREROUTING -s xx.xx.81.0/24 ! -d 10.200.0.4/32 -i eth2 -m state --state NEW -j ACL_OUTBOUND_eth2

note:
in my testing, private gatway ip is 10.200.0.4, gateway is 10.200.0.1

@vishesh92
Copy link
Member Author

@blueorangutan package

@weizhouapache
Copy link
Member

@vishesh92
I added a commit to #10268
8d3468e

similar change might be needed

@vishesh92 vishesh92 force-pushed the fixup-private-gw-acl branch from 22462bd to 2fa9d88 Compare February 6, 2025 09:00
@weizhouapache
Copy link
Member

@blueorangutan package

1 similar comment
@weizhouapache
Copy link
Member

@blueorangutan package

@weizhouapache
Copy link
Member

@blueorangutan test

@blueorangutan
Copy link

[SF] Trillian test result (tid-12347)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 53108 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10262-t12347-kvm-ol8.zip
Smoke tests completed. 131 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_secure_vm_migration Error 326.77 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 3739.89 test_vm_life_cycle.py
test_03_secured_to_nonsecured_vm_migration Error 395.59 test_vm_life_cycle.py
test_04_nonsecured_to_secured_vm_migration Error 350.28 test_vm_life_cycle.py
test_04_deploy_vnf_appliance Error 143.70 test_vnf_templates.py
test_04_deploy_vnf_appliance Error 143.70 test_vnf_templates.py
test_05_delete_vnf_template Error 1.12 test_vnf_templates.py
ContextSuite context=TestVnfTemplates>:teardown Error 2.28 test_vnf_templates.py

@DaanHoogland
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 12392

@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@apache apache deleted a comment from blueorangutan Feb 9, 2025
@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

@blueorangutan
Copy link

[SF] Trillian test result (tid-12361)
Environment: kvm-ol8 (x2), Advanced Networking with Mgmt server ol8
Total time taken: 46829 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr10262-t12361-kvm-ol8.zip
Smoke tests completed. 132 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_04_nonsecured_to_secured_vm_migration Error 393.61 test_vm_life_cycle.py

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested this in a lab env with two VPCs
10.10.0.0/16 and 10.11.0.0/16
private gateways 10.200.20.1 and 10.200.20.2 connected (as each others gateway and tested several acl lists configurations to block/allow tcp/icmp.

The only noteworthy limitation is that running processes won't get blocked. I do not consider that part of this PR/issue and am not sure if that needs solving, as restart with cleanup would take care of that.

Copy link
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@DaanHoogland DaanHoogland merged commit ae1d7cc into apache:4.19 Feb 10, 2025
25 of 26 checks passed
@DaanHoogland DaanHoogland deleted the fixup-private-gw-acl branch February 10, 2025 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

private gateway ACL does not apply on the static routes
5 participants