Skip to main content

tETHer - ethernet tethering

Tether one device to another over an ethernet interface on linux (rather than USB)

Tethering proxies one device through another devices internet connections. A common use case is to connect to a mobile phone over USB and then use its internet connection. tETHer does the same thing but via an ethernet connection such as an rj-45 cable. This also allows forwarding

Unreviewed ai-generated code. But I am using it.

Motivation

I had a camera which only supported wired connection. I did not want to run a long wire to a router and wireless bridges were moderately expensive so I decided to get this working with an old raspberry pi. I don't really like "infrastructure" because I forget how it works. I prefer tools which minimise the amount of infrastructure so I coded this.

Alterantives and prior work

Use a wireless bridge. Hand code the networking yourself using wireless. RaspAP is an image for raspberry pi to set up a wireless bridge it also supports port forwarding.

This is very similar to the idea of setting up an access point, but it has some additional features for port forwarding which are made easier if you are providing access or a single device.

Installation

tETHer requires nmap dnsmasq and Linux. On a linux machine install them: sudo apt install nmap dnsmasq pipx.

You can then install with pipx: pipx install t-eth-er

Usage

Set up dhcp and forwarding on eth0 so that if you plug in a device which uses DHCP it will connect to you and then via you to the rest of the network - including the internet.

eth-tether eth0

If you want to forward ports you can capture all the ports that the tethering machine has

eth-tether eth0 --scan ports

Then on subsequent files you can use the generated ports file

eth-tether eth0 --ports ports

To avoid requiring too many permissions, tETHer uses sudo to run privileged commands. You can allow your use to only run these commands or you can run the entire commadn with sudo. To get a sudoers file alowing these commands run eth-tether eth0 --sudoers

Metadata

Release files for t-eth-er 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for t-eth-er 1.3.2
File Size Uploaded Provenance Actions
t_eth_er-1.3.2.tar.gz 6.6 kB Without provenance Details for t_eth_er-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for t-eth-er 1.3.2
File Interpreter ABI Platform Actions
t_eth_er-1.3.2-py3-none-any.whl Python 3 none any Details for t_eth_er-1.3.2-py3-none-any.whl

Total release size: 13.5 kB

Release files / t_eth_er-1.3.2.tar.gz

Download URL t_eth_er-1.3.2.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
83ae4b786eca1221886ad2dca187876a4fb1320bcddf3a4026aea887d2952bc0
BLAKE2b-256 checksum
How to use checksums
e99d4bb7f5767918c62a120b30a6e85eafdc6b5ba0d18329833dbc0a591644fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / t_eth_er-1.3.2-py3-none-any.whl

Download URL t_eth_er-1.3.2-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a915060395da8b8f4b3df08c9b9824030e11a9a19676234fbac99116e0e3822
BLAKE2b-256 checksum
How to use checksums
947e4a2c96ea9694e9e8c8feb831426c6ff892a20f0abc3ea7d306b3366ec38d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for t-eth-er 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page