From 1b5a3f6d2ee71e75bdef9540ff204940b72a1f5c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 15 Jan 2020 13:26:05 +0100 Subject: [PATCH] Progress with networking --- docs/source/hacking.rst | 11 +++++++++++ uncloud/hack/main.py | 10 ++++++++++ uncloud/hack/net.py | 4 ++++ 3 files changed, 25 insertions(+) diff --git a/docs/source/hacking.rst b/docs/source/hacking.rst index d198126..1c750d6 100644 --- a/docs/source/hacking.rst +++ b/docs/source/hacking.rst @@ -23,3 +23,14 @@ You need to have python3 installed. python -m venv venv . ./venv/bin/activate ./bin/uncloud-run-reinstall + + + +Install os requirements +----------------------- +Install the following software packages: **dnsmasq**. + +If you already have a working IPv6 SLAAC and DNS setup, +this step can be skipped. + +Note that you need at least one /64 IPv6 network to run uncloud. diff --git a/uncloud/hack/main.py b/uncloud/hack/main.py index 2980516..d7a4714 100644 --- a/uncloud/hack/main.py +++ b/uncloud/hack/main.py @@ -3,12 +3,18 @@ import argparse from uncloud.hack.vm import VM from uncloud.hack.config import Config from uncloud.hack.mac import MAC +from uncloud import UncloudException arg_parser = argparse.ArgumentParser('hack', add_help=False) #description="Commands that are unfinished - use at own risk") arg_parser.add_argument('--create-vm', action='store_true') arg_parser.add_argument('--last-used-mac', action='store_true') arg_parser.add_argument('--get-new-mac', action='store_true') +arg_parser.add_argument('--management-network', help="IPv6 management network") +arg_parser.add_argument('--run-dns-ra', action='store_true', + help="Provide router advertisements and DNS resolution via dnsmasq") + + def main(arguments): @@ -26,3 +32,7 @@ def main(arguments): if arguments['get_new_mac']: print(MAC(config).get_next()) + + if arguments['run_dns_ra']: + if not arguments['management_network']: + raise UncloudException("Providing DNS/RAs requires a /64 IPv6 network. You can use fd00::/64 for testing (non production!)") diff --git a/uncloud/hack/net.py b/uncloud/hack/net.py index 142eeb7..0a7819b 100644 --- a/uncloud/hack/net.py +++ b/uncloud/hack/net.py @@ -19,3 +19,7 @@ class VXLANBridge(object): class DNSRA(object): def __init__(self): pass + + +class Firewall(object): + pass