From 4e1dc7c1aa70977e3b5f3785382c1975f062770a Mon Sep 17 00:00:00 2001 From: Alexandros Afentoulis Date: Mon, 27 Aug 2018 17:07:58 +0300 Subject: [PATCH] oci-poc-virtual-network: introduce management interface parameter Let the host's management interface be configurable in oci-poc.conf. This parameters is then used to configure DNAT iptables rules. --- ...enstack-cluster-installer-poc.oci-poc-virtual-network.init | 4 ++-- poc-etc/oci-poc/oci-poc.conf | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/openstack-cluster-installer-poc.oci-poc-virtual-network.init b/debian/openstack-cluster-installer-poc.oci-poc-virtual-network.init index dfe4d2b2..43d1fe6c 100644 --- a/debian/openstack-cluster-installer-poc.oci-poc-virtual-network.init +++ b/debian/openstack-cluster-installer-poc.oci-poc-virtual-network.init @@ -79,8 +79,8 @@ fake_ifs () { ip6tables -t nat -I POSTROUTING -s ${HOST_BRIDGE_NET6} -j MASQUERADE # Forward to OCI's web interface - iptables -t nat -I PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to-destination ${OCI_VM_IP}:80 - iptables -t nat -I PREROUTING -p tcp -i eth0 --dport 443 -j DNAT --to-destination ${OCI_VM_IP}:443 + iptables -t nat -I PREROUTING -p tcp -i ${HOST_MGMT_INTERFACE} --dport 80 -j DNAT --to-destination ${OCI_VM_IP}:80 + iptables -t nat -I PREROUTING -p tcp -i ${HOST_MGMT_INTERFACE} --dport 443 -j DNAT --to-destination ${OCI_VM_IP}:443 } stop_fake_ifs () { diff --git a/poc-etc/oci-poc/oci-poc.conf b/poc-etc/oci-poc/oci-poc.conf index ddfa5854..eb4fb42f 100644 --- a/poc-etc/oci-poc/oci-poc.conf +++ b/poc-etc/oci-poc/oci-poc.conf @@ -9,6 +9,8 @@ OCI_VM_ROOT_PASS=a_big_secret ##################################### ### Host interfaces configuration ### ##################################### +HOST_MGMT_INTERFACE=eth0 + HOST_NETWORK_PREFIX=192.168.100 # This will provision access to 4 cluster networks in the host's -- GitLab