brnet


Namebrnet JSON
Version 0.0.6 PyPI version JSON
download
home_page
SummaryTool to convert ethernet interface to bridge for emulation
upload_time2023-06-23 00:33:36
maintainer
docs_urlNone
author
requires_python>=3.9
licenseMIT License Copyright (c) 2020-2023 Adam Thornton Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords brnet pi emulation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # brnet

These is a networking tool to make running emulated systems under Linux
a little easier and more secure.

I have been using simh and klh10 a lot recently to emulate old computers
and operating systems.  Networking has been a particular pain because
most of these systems require raw access to the network devices, and
that typically means running the as root.

I didn't want to do that.  So I wrote brnet.

What this script does is to take the interface you specify (defaulting
to eth0) and turn it into a bridge device.  The using a user and group
you specify (it defaults to pi/adm, which is correct for a PiDP-11), it
creates a number of tap interfaces (defaulting to 4), and connects them
to the bridge too.

The point of doing that is so that you can run brnet with root
privileges to create network devices that another user can own and have
full control of without requiring escalated privileges.

After running brnet, you can therefore use, say, the `tap0` interface in
a guest system as your emulated ethernet device, and run as your normal
emulator user without sudo, and still have the network interface work.

# Installing

`pip install brnet`, or check out the repository and do a `pip install
-e .`  You probably want to do this in a virtualenv, and if you do that,
you probably want to install a wrapper script as `/usr/local/bin/brnet`
to activate the appropriate virtualenv and then run the `brnet` command
(virtualenv activation will put the new stuff at the head of your
`$PATH`).  One approach to this is [here](./wrapper.sh).

Then you want to drop the following into `/etc/network/interfaces.d` to
start the network after the physical interface comes up.  I called my
file [`01-phys-to-bridge`](./01-phys-to-bridge).

# Examples

To run using the defaults, which should work for a Raspberry Pi running
the PiDP-11 software: `brnet start`.

To run with a different user and group and more tap devices:

`brnet -u adam -g wheel -n 8 start`

To shut down the bridge and put things back the way they were:

`brnet stop`

`brnet -h` will give you a help message explaining all the parameters.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "brnet",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "brnet,pi,emulation",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/10/dc/204828c7878769d31f29e056afc42d2836c3926501159a13c5ad93d25d0a/brnet-0.0.6.tar.gz",
    "platform": null,
    "description": "# brnet\n\nThese is a networking tool to make running emulated systems under Linux\na little easier and more secure.\n\nI have been using simh and klh10 a lot recently to emulate old computers\nand operating systems.  Networking has been a particular pain because\nmost of these systems require raw access to the network devices, and\nthat typically means running the as root.\n\nI didn't want to do that.  So I wrote brnet.\n\nWhat this script does is to take the interface you specify (defaulting\nto eth0) and turn it into a bridge device.  The using a user and group\nyou specify (it defaults to pi/adm, which is correct for a PiDP-11), it\ncreates a number of tap interfaces (defaulting to 4), and connects them\nto the bridge too.\n\nThe point of doing that is so that you can run brnet with root\nprivileges to create network devices that another user can own and have\nfull control of without requiring escalated privileges.\n\nAfter running brnet, you can therefore use, say, the `tap0` interface in\na guest system as your emulated ethernet device, and run as your normal\nemulator user without sudo, and still have the network interface work.\n\n# Installing\n\n`pip install brnet`, or check out the repository and do a `pip install\n-e .`  You probably want to do this in a virtualenv, and if you do that,\nyou probably want to install a wrapper script as `/usr/local/bin/brnet`\nto activate the appropriate virtualenv and then run the `brnet` command\n(virtualenv activation will put the new stuff at the head of your\n`$PATH`).  One approach to this is [here](./wrapper.sh).\n\nThen you want to drop the following into `/etc/network/interfaces.d` to\nstart the network after the physical interface comes up.  I called my\nfile [`01-phys-to-bridge`](./01-phys-to-bridge).\n\n# Examples\n\nTo run using the defaults, which should work for a Raspberry Pi running\nthe PiDP-11 software: `brnet start`.\n\nTo run with a different user and group and more tap devices:\n\n`brnet -u adam -g wheel -n 8 start`\n\nTo shut down the bridge and put things back the way they were:\n\n`brnet stop`\n\n`brnet -h` will give you a help message explaining all the parameters.\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2020-2023 Adam Thornton  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Tool to convert ethernet interface to bridge for emulation",
    "version": "0.0.6",
    "project_urls": {
        "Source": "https://github.com/athornton/brnet"
    },
    "split_keywords": [
        "brnet",
        "pi",
        "emulation"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a5601f2827f398997094a2890cc45e53268fd1fe5828a72504bb2cc3ac39932b",
                "md5": "802a0c3c63cae6456e6952ea8a31162e",
                "sha256": "c6131bb1ea5b38f30b9b0e3a604ed9f6b19e5fb894abae5939900abed61906f9"
            },
            "downloads": -1,
            "filename": "brnet-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "802a0c3c63cae6456e6952ea8a31162e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7324,
            "upload_time": "2023-06-23T00:33:35",
            "upload_time_iso_8601": "2023-06-23T00:33:35.533344Z",
            "url": "https://files.pythonhosted.org/packages/a5/60/1f2827f398997094a2890cc45e53268fd1fe5828a72504bb2cc3ac39932b/brnet-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "10dc204828c7878769d31f29e056afc42d2836c3926501159a13c5ad93d25d0a",
                "md5": "bf5ffea22e3749d1942d92a8781a6707",
                "sha256": "d8fab15f09c6f4e58a84d57c6239d623977a735496d3b53839133c31f496eea0"
            },
            "downloads": -1,
            "filename": "brnet-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "bf5ffea22e3749d1942d92a8781a6707",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 21710,
            "upload_time": "2023-06-23T00:33:36",
            "upload_time_iso_8601": "2023-06-23T00:33:36.771445Z",
            "url": "https://files.pythonhosted.org/packages/10/dc/204828c7878769d31f29e056afc42d2836c3926501159a13c5ad93d25d0a/brnet-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-23 00:33:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "athornton",
    "github_project": "brnet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "brnet"
}
        
Elapsed time: 0.08092s