aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/network.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/network.sh')
-rwxr-xr-xdeploy/network.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/deploy/network.sh b/deploy/network.sh
index eea62277..b74a1b40 100755
--- a/deploy/network.sh
+++ b/deploy/network.sh
@@ -10,6 +10,10 @@
function clear_forward_rejct_rules()
{
while sudo iptables -nL FORWARD --line-number|grep -E 'REJECT +all +-- +0.0.0.0/0 +0.0.0.0/0 +reject-with icmp-port-unreachable'|head -1|awk '{print $1}'|xargs sudo iptables -D FORWARD; do :; done
+ ip_forward=$(cat /proc/sys/net/ipv4/ip_forward)
+ if [ $ip_forward -eq 0 ]; then
+ sysctl -w net.ipv4.ip_forward=1
+ fi
}
function setup_bridge_net()
@@ -143,7 +147,8 @@ function setup_baremetal_net() {
exit 1
fi
sudo ifconfig $INSTALL_NIC up
- sudo ifconfig $INSTALL_NIC $INSTALL_GW
+ sudo ifconfig $INSTALL_NIC promisc
+ sudo ifconfig $INSTALL_NIC $INSTALL_GW netmask $INSTALL_NETMASK
}
function recover_baremetal_net() {