I\'ve seen that it is pretty easy to enable IP forwarding on Linux from a python script:
os.system("echo 1 > /proc/sys/net/ipv4/ip_forward") is
os.system("echo 1 > /proc/sys/net/ipv4/ip_forward")