Commit 410f51c4 authored by Guillaume Bury's avatar Guillaume Bury

Renamed openvpn scripts

parent 164cbdd4
...@@ -45,3 +45,25 @@ def client(serverIp, pipe_fd, *args, **kw): ...@@ -45,3 +45,25 @@ def client(serverIp, pipe_fd, *args, **kw):
'--route-up', 'route-up ' + str(pipe_fd), '--route-up', 'route-up ' + str(pipe_fd),
*args, **kw) *args, **kw)
def startBabel(**kw):
args = ['babeld',
'-C', 'redistribute local ip %s' % (utils.config.internal_ip),
'-C', 'redistribute local deny',
# Route VIFIB ip adresses
'-C', 'in ip %s::/%u' % (utils.ipFromBin(utils.config.vifibnet), len(utils.config.vifibnet)),
# Route only addresse in the 'local' network,
# or other entire networks
#'-C', 'in ip %s' % (config.internal_ip),
#'-C', 'in ip ::/0 le %s' % network_mask,
# Don't route other addresses
'-C', 'in deny',
'-d', str(utils.config.verbose),
'-s',
]
if utils.config.babel_state:
args += '-S', utils.config.babel_state
args = args + ['vifibnet'] + list(tunnelmanager.free_interface_set)
if utils.config.verbose >= 5:
print args
return subprocess.Popen(args, **kw)
#!/usr/bin/env python #!/usr/bin/env python
import argparse, errno, math, os, select, subprocess, sys, time import argparse, errno, math, os, select, subprocess, sys, time, traceback
from OpenSSL import crypto from OpenSSL import crypto
import traceback import db, openvpn, upnpigd, utils, tunnelmanager
import upnpigd
import openvpn
import utils
import db
import tunnelmanager
def startBabel(**kw):
args = ['babeld',
'-C', 'redistribute local ip %s' % (utils.config.internal_ip),
'-C', 'redistribute local deny',
# Route VIFIB ip adresses
'-C', 'in ip %s::/%u' % (utils.ipFromBin(utils.config.vifibnet), len(utils.config.vifibnet)),
# Route only addresse in the 'local' network,
# or other entire networks
#'-C', 'in ip %s' % (config.internal_ip),
#'-C', 'in ip ::/0 le %s' % network_mask,
# Don't route other addresses
'-C', 'in deny',
'-d', str(utils.config.verbose),
'-s',
]
if utils.config.babel_state:
args += '-S', utils.config.babel_state
args = args + ['vifibnet'] + list(tunnelmanager.free_interface_set)
if utils.config.verbose >= 5:
print args
return subprocess.Popen(args, **kw)
def handle_message(msg): def handle_message(msg):
script_type, arg = msg.split() script_type, arg = msg.split()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment