cloudstack/systemvm/patches/debian/config/opt/cloud/bin
Igor Voloshanenko 12f526bbfe CLOUDSTACK-10200: Fix ACL_INBOUND/OUTBOUND rules for PrivateGateway (#2367)
We found bug in ACL rules for PrivateGateway for VPC

At a glance - rules not applied - switching Allow All or Deny All (default ACL) - showed as completed - but rules missed.
Result - traffic via PrivateGateway blocked by next DROP rule in next chains

How to reproduce:

Enable PrivateGateway for Cloudstack
Create VPC
Provision new PrivateGateway inside VPC with some VLAN
Change ACL (optional step to show that problem not in initial configuration but in config itself)
Expected:
ACL rules applied (inserted) into correspondig ACL_INBOUND/OUTBOUND chanins for PrivateGateway interface (ethX) based on ACL which user choose

Current:
No rules inserted. ACL_INBOUND/OUTBOUND_ethX - empty. Traffic blocked by next DROP rule in FORWARD chain

Affect - all our corporate customers blocked with access to their own nets via PG and vice-versa.

Root cause:
Issue happened because of CsNetFilter.py logic for inserting rules for ACL_INBOUND/OUTBOUND chains.

We choose rule numebr to isnert right before last DROP rule - but forget about fact - that if chain empty - we also return 0 as insert position. Which not true for iptables - numeration started from 0.

So we need very small patch to handle this special case - if number of rules inside chain equal to zero - return 1, else - return count of rules inside chain.

It's found only one - just because be default for PrivateGateway - we didn't insert any "service rules" (if SourceNat for PrivateGteway not ticked) - and we have by default empty ACL_INBOUND/OUTBOUND chains. Because same insert happened for all VPC networks (but when we call this insert - we already have at least 1 rule inside chains - and we successfully can process)
2017-12-21 14:55:48 +05:30
..
cs CLOUDSTACK-10200: Fix ACL_INBOUND/OUTBOUND rules for PrivateGateway (#2367) 2017-12-21 14:55:48 +05:30
baremetal-vr.py Removing "global" declaration from if block 2015-03-16 11:38:13 +01:00
baremetal_snat.sh restore barematel work after merge 2014-10-17 10:24:01 +02:00
bumpup_priority.sh CLOUDSTACK-5779: Moving bumpUpPriority, edithosts.sh, dnsmasq.sh to use routeProxy 2014-01-16 16:03:09 -08:00
checkbatchs2svpn.sh Gather all S2S vpn statuses before outputting 2017-07-23 13:07:36 +02:00
checkrouter.sh make both check lines consistent 2015-12-28 17:06:58 +01:00
checks2svpn.sh complete implementation of the StrongSwan VPN feature 2017-02-02 16:18:06 -05:00
cloud-nic.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
configure.py CLOUDSTACK-10168: VR duplicate entries in /etc/hosts when reusing VM name (#2366) 2017-12-20 23:19:12 +05:30
cs_cmdline.py ACL issues 2015-03-16 11:40:10 +01:00
cs_dhcp.py CLOUDSTACK-10168: VR duplicate entries in /etc/hosts when reusing VM name (#2366) 2017-12-20 23:19:12 +05:30
cs_firewallrules.py Pep8 changes that got lost with the strange double push request problem last time 2015-05-26 07:07:43 -04:00
cs_forwardingrules.py ACL issues 2015-03-16 11:40:10 +01:00
cs_guestnetwork.py ACL issues 2015-03-16 11:40:10 +01:00
cs_ip.py changed the order fix to be closer to the original code 2017-03-17 15:07:11 -04:00
cs_loadbalancer.py ACL issues 2015-03-16 11:40:10 +01:00
cs_monitorservice.py ACL issues 2015-03-16 11:40:10 +01:00
cs_network_acl.py ACL issues 2015-03-16 11:40:10 +01:00
cs_remoteaccessvpn.py CLOUDSTACK-8690:Added remote access vpn and vpn users configuration 2015-09-09 10:50:50 +05:30
cs_site2sitevpn.py Fix unable to setup more than one Site2Site VPN Connection 2016-01-12 11:24:35 +01:00
cs_staticroutes.py CLOUDSTACK-9266: Make deleting static routes in private gw work 2016-01-30 06:25:00 +01:00
cs_vmdata.py ACL issues 2015-03-16 11:40:10 +01:00
cs_vmp.py CLOUDSTACK-10113 password resets only one at the time 2017-10-25 09:29:35 +02:00
cs_vpnusers.py CLOUDSTACK-8690:Added remote access vpn and vpn users configuration 2015-09-09 10:50:50 +05:30
dnsmasq.sh CLOUDSTACK-5779: Moving bumpUpPriority, edithosts.sh, dnsmasq.sh to use routeProxy 2014-01-16 16:03:09 -08:00
edithosts.sh CLOUDSTACK-7974: remove old hostname entry for a VM when adding a VM 2014-12-10 18:25:22 +05:30
getRouterAlerts.sh CLOUDSTACK-9183: bash: /opt/cloud/bin/getRouterAlerts.sh: No such file or directory 2016-10-31 21:44:15 +00:00
get_template_version.sh CLOUDSTACK-9828: GetDomRVersionCommand fails to get the correct version as output 2017-03-09 14:15:45 +05:30
ilb.sh CLOUDSTACK-6047: Make VR LB script accept a file name 2014-02-21 18:26:42 -08:00
ipassoc.sh CLOUDSTACK-7544: Fixed ip addr del issues in ipassoc 2014-09-15 14:54:13 +05:30
ipsectunnel.sh made iptables for the VPN connection more secure 2014-12-08 19:06:55 +01:00
line_edit.py Fancy line editor for Ian 2015-03-16 11:35:11 +01:00
loadbalancer.sh CLOUDSTACK-6047: Make VR LB script accept a file name 2014-02-21 18:26:42 -08:00
master.py CLOUDSTACK-9015 - Make sure the Backup router can talk to the Master router after a stop/start/reboot 2015-11-12 18:13:51 +01:00
merge.py CLOUDSTACK-9999: vpc tiers do not work if vpc has more than 8 tiers (#2180) 2017-08-13 01:19:51 +02:00
monitor_service.sh CLOUDSTACK-6714: monitor script echo service command is added with quotes 2014-05-20 14:11:19 +05:30
netusage.sh Added code to configure netusage for vpc and domR devices 2015-03-16 11:35:27 +01:00
passwd_server CLOUDSTACK-7376 passwd_server attempts to start but terminates with the exit code 137 2014-09-17 09:28:44 -07:00
passwd_server_ip CLOUDSTACK-9749: Disable password service on ilb systemvm (#1912) 2017-08-03 22:38:25 +02:00
passwd_server_ip.py CLOUDSTACK-9058 2015-11-12 08:05:57 +00:00
patchsystemvm.sh CLOUDSTACK-9993: With auth strictness stop SSL handshake for rogue clients (#2278) 2017-10-04 09:53:49 +05:30
prepare_pxe.sh restore barematel work after merge 2014-10-17 10:24:01 +02:00
savepassword.sh CLOUDSTACK-8331: have savepassword try all interfaces 2015-03-18 14:40:23 +05:30
set_redundant.py Java: Fixing the redundant flag for the router control nic and the guest network command; 2015-03-16 11:39:15 +01:00
test.sh Add missing license headers from recent branch merge 3c429ee 2015-03-18 11:03:54 +05:30
update_config.py Revert "Merge pull request #2084 from shapeblue/passwd-speedup" 2017-06-26 09:58:33 +05:30
vmdata.py Fix PEP8 compliance 2015-03-16 11:38:07 +01:00
vpc_func.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vpc_netusage.sh Added code to configure netusage for vpc and domR devices 2015-03-16 11:35:27 +01:00
vpc_passwd_server systemvm: fix socat usage 2015-03-30 13:50:39 +05:30
vpc_snat.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vpc_staticroute.sh Move the system vm to a separate maven project. 2013-09-20 18:31:02 +08:00
vr_cfg.sh CLOUDSTACK-9980: Fix for DNS after network restart with clean up. 2017-06-28 12:21:14 +02:00