{"id":19722020,"url":"https://github.com/sensoranalyticsaus/wifi2eth-bridge","last_synced_at":"2025-06-26T01:34:34.080Z","repository":{"id":224468569,"uuid":"614243403","full_name":"SensorAnalyticsAus/wifi2eth-bridge","owner":"SensorAnalyticsAus","description":"Raspberry Pi WiFi to Ethernet Bridge","archived":false,"fork":false,"pushed_at":"2024-08-20T07:35:43.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-10T16:23:40.054Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SensorAnalyticsAus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-15T07:34:35.000Z","updated_at":"2024-08-20T07:35:46.000Z","dependencies_parsed_at":"2024-02-26T06:24:26.792Z","dependency_job_id":"e1ba9f0c-2fed-4913-8a82-921f52a29bc3","html_url":"https://github.com/SensorAnalyticsAus/wifi2eth-bridge","commit_stats":null,"previous_names":["sensoranalyticsaus/wifi2eth-bridge"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SensorAnalyticsAus%2Fwifi2eth-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SensorAnalyticsAus%2Fwifi2eth-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SensorAnalyticsAus%2Fwifi2eth-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SensorAnalyticsAus%2Fwifi2eth-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SensorAnalyticsAus","download_url":"https://codeload.github.com/SensorAnalyticsAus/wifi2eth-bridge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241044204,"owners_count":19899478,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T23:16:14.909Z","updated_at":"2025-02-27T18:28:20.921Z","avatar_url":"https://github.com/SensorAnalyticsAus.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"## About\nSteps to connect Ethernet only devices, e.g. POE security cams, to home WiFi.\n\n## Requirements\n* A raspberry pi board running PiOS and connected to home WiFi\n* Ethernet cable\n\n## Steps\n1. Install `dnsmasq` \n```\nsudo apt update\nsudo apt upgrade\nsudo apt-get install dnsmasq\n```\n2. Setup `/etc/dhcpcd.conf`\n```\nsudo vi /etc/dhcpcd.conf\n```\nGo to Example static IP configuration section and append the following lines:\n\n```\ninterface eth0\nmetric 333\nstatic ip_address=192.168.10.1/24\nstatic routers=192.168.10.0\n```\nNB: Metric should be higher than the default home WiFi gateway's metric (say if it was 303 then we'd use 333).\n\n3. Restart `dhcpcd.service` and verify it started OK.\n```\nsudo systemctl restart dhcpcd.service\nsudo systemctl status dhcpcd.service\n```\nOutput should look something like:\n```\ndhcpcd.service - dhcpcd on all interfaces\n   Loaded: loaded (/lib/systemd/system/dhcpcd.service; enabled; vendor preset: e\n   Active: active (running) since Tue 2023-03-14 13:23:29 AEDT; 1 day 4h ago\n  Process: 470 ExecStart=/usr/lib/dhcpcd5/dhcpcd -q -b (code=exited, status=0/SU\n Main PID: 525 (dhcpcd)\n    Tasks: 2 (limit: 2059)\n   CGroup: /system.slice/dhcpcd.service\n           ├─525 /sbin/dhcpcd -q -b\n           └─573 wpa_supplicant -B -c/etc/wpa_supplicant/wpa_supplicant.conf -iw\n\n```\n\n4. Save original `/etc/dnsmasq.conf`\n```\nsudo mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig\n```\n\n5. Create a new `/etc/dnsmasq.conf`\n```\nsudo vi /etc/dnsmasq.conf\n```\nAdd the following lines:\n```\ninterface=eth0       # Use interface eth0\nlisten-address=192.168.10.1   # Specify the address to listen on\nbind-dynamic         # Bind to the interface\nserver=8.8.8.8       # Use Google DNS\ndomain-needed        # Don't forward short names\nbogus-priv           # Drop the non-routed address spaces.\ndhcp-range=192.168.10.50,192.168.10.150,12h # IP range and lease time\n```\n\n6. Enable IP forwarding (if not already done so):\n```\nsudo vi /etc/sysctl.conf\n```\nThen uncomment `#net.ipv4.ip_forward=1`\n```\nsudo sh -c \"echo 1 \u003e /proc/sys/net/ipv4/ip_forward\"\n```\n\n7. Setup `iptables` rules.\\\n  NB: Edit in correct camera IP addresses (ref `/var/lib/misc/dnsmasq.leases`). Then run the scripts to generate `iptables` rules and to save these in `/etc/iptables.ipv4.nat`.\n```\nchmod 755 00-wifi2eth-*\n./00-wifi2eth-bridged-rules\n./00-wifi2eth-save-my-iptables\n```\n8. Add saved `iptables` rules for load-up on reboot by editing `sudo vi /etc/rc.local` and adding before `exit 0` the following line `iptables-restore \u003c /etc/iptables.ipv4.nat`\n\n9. Re-start `dnsmasq`\n```\nsudo systemctl restart dnsmasq.service\nsudo systemctl status dnsmasq.service\n```\nOutput should look something like:\n```\ndnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server\n   Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled; vendor preset: \n   Active: active (running) since Tue 2023-03-14 13:23:32 AEDT; 1 day 5h ago\n  Process: 548 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCC\n  Process: 559 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0\n  Process: 588 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=\n Main PID: 587 (dnsmasq)\n    Tasks: 1 (limit: 2059)\n   CGroup: /system.slice/dnsmasq.service\n           └─587 /usr/sbin/dnsmasq -x /run/dnsmasq/dnsmasq.pid -u dnsmasq -r /ru\n```\n\n10. The cameras specified in `00-wifi2eth-bridged-rules` should now be viewable from anywhere in home WiFi with their RTSP URLs e.g. `rtsp://rpi.local:2222/cam1_rtsp_string` and `rtsp://rpi.local:3333/cam2_rtsp_string` respectively.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensoranalyticsaus%2Fwifi2eth-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsensoranalyticsaus%2Fwifi2eth-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsensoranalyticsaus%2Fwifi2eth-bridge/lists"}