From 16e714b5441ac1122fb87ed2dff9c6064c8134ca Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 7 Oct 2018 17:47:03 -0400 Subject: [PATCH] Add sysctl commands to daemon startup --- router-daemon/pvcrd/Daemon.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/router-daemon/pvcrd/Daemon.py b/router-daemon/pvcrd/Daemon.py index 2a3f3f4b..7be946d5 100644 --- a/router-daemon/pvcrd/Daemon.py +++ b/router-daemon/pvcrd/Daemon.py @@ -41,6 +41,14 @@ import pvcrd.VXNetworkInstance as VXNetworkInstance print(ansiiprint.bold() + "pvcrd - Parallel Virtual Cluster router daemon" + ansiiprint.end()) +# Set sysctl to enable routing before we do anything else +common.run_os_command('sysctl net.ipv4.ip_forward=1') +common.run_os_command('sysctl net.ipv4.conf.all.send_redirects=1') +common.run_os_command('sysctl net.ipv4.conf.all.accept_source_route=1') +common.run_os_command('sysctl net.ipv6.ip_forward=1') +common.run_os_command('sysctl net.ipv6.conf.all.send_redirects=1') +common.run_os_command('sysctl net.ipv6.conf.all.accept_source_route=1') + # Get the config file variable from the environment try: pvcrd_config_file = os.environ['PVCRD_CONFIG_FILE']