Skip to content

Instantly share code, notes, and snippets.

@aejh
Last active July 2, 2021 08:08
Show Gist options
  • Save aejh/8433b01a8a60e1618cb86dd56eaf5949 to your computer and use it in GitHub Desktop.
Save aejh/8433b01a8a60e1618cb86dd56eaf5949 to your computer and use it in GitHub Desktop.
Rpi zero USB networking, with Linux host
# After rootwait:
modules-load=dwc2,g_ether
# Append
dtoverlay=dwc2
# g_ether fixed ip
interface usb0
static ip_address=192.168.137.2/24
static routers=192.168.137.1
# Something on the LAN, will be forwarded by host
static domain_name_servers=10.0.0.1
### On host, not the pi.
[Match]
Property=ID_MODEL_ID=a4a2 "ID_USB_DRIVER=cdc_ether"
[Network]
Address=192.168.137.1/24
IPForward=true
IPMasquerade=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment