Skip to content

private gateway ACLs are not applied correctly #9838

Closed

Description

@weizhouapache

Steps to reproduce the issue

  • add a vpc
  • add a vpc tier and deploy a vm
  • add a private gateway with ACL default_deny

expected:

  • vm to private gw is blocked
  • private gw to vm is blocked

actual:

  • vm to private gw is allowed
  • private gw to vm is blocked
ISSUE TYPE
  • Bug Report
COMPONENT NAME
VPC VR
CLOUDSTACK VERSION
4.19
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS

Activity

  1. added this to the 4.19.2.0 milestone on Oct 22, 2024
  2. moved this from Todo to Dev In Progress in Apache CloudStack BugFest - Issueson Jan 22, 2025
  3. linked a pull request that will close this issueFix private gateway acl on static routes #10262on Jan 24, 2025
  4. moved this from Dev In Progress to ready for Review in Apache CloudStack BugFest - Issueson Jan 24, 2025
  5. moved this from ready for Review to Dev In Progress in Apache CloudStack BugFest - Issueson Jan 24, 2025
  6. weizhouapache commented on Jan 24, 2025

    @weizhouapache
    MemberAuthor

    it looks the issue is because of the order of rules

    root@r-10-VM:~#iptables-save |grep FORWARD
    :FORWARD ACCEPT [97:8028]
    -A FORWARD -j VPN_STATS_eth1
    -A FORWARD -j VPN_STATS_eth2
    :FORWARD DROP [95:7876]
    -A FORWARD -j NETWORK_STATS_eth2
    -A FORWARD -j NETWORK_STATS_eth1
    -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
    -A FORWARD -s 172.18.0.0/20 ! -d 172.18.0.0/20 -j ACCEPT
    -A FORWARD -d 10.200.0.0/24 -o eth2 -j ACL_INBOUND_eth2
    -A FORWARD -d 172.18.1.0/24 -o eth3 -j ACL_INBOUND_eth3
    

    because of

    -A FORWARD -s 172.18.0.0/20 ! -d 172.18.0.0/20 -j ACCEPT
    

    the packet from vm to private gateway is accepted, so that the next rule becomes useless

    -A FORWARD -d 10.200.0.0/24 -o eth2 -j ACL_INBOUND_eth2
    
  7. moved this from Dev In Progress to ready for Review in Apache CloudStack BugFest - Issueson Jan 24, 2025
  8. DaanHoogland commented on Feb 13, 2025

    @DaanHoogland
    Contributor

    fixed in #10268

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions