diff options
author | wutianwei <wutianwei1@huawei.com> | 2018-06-19 10:52:26 +0800 |
---|---|---|
committer | Harry Huang <huangxiangyu5@huawei.com> | 2018-06-20 06:37:18 +0000 |
commit | c51e937d7a121f8a267f0522fb787adbfb1a7eb9 (patch) | |
tree | f06da14eb8449754e863309d057622daaaa15f20 /deploy | |
parent | c8e9084e0108a72c3e46f6638f16056f39203537 (diff) |
check ip_forward and set to 1opnfv-6.2.0
JIRA: COMPASS-600
Change-Id: I21ace213060d9d0dde7f7f4b5cf1f79d567ebeb0
Signed-off-by: wutianwei <wutianwei1@huawei.com>
(cherry picked from commit 1a1ed339b96458c483976a820e30b3a1bbb0b5d8)
Diffstat (limited to 'deploy')
-rwxr-xr-x | deploy/network.sh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/deploy/network.sh b/deploy/network.sh index ebe0eece..18526284 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() |