Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/danielpgross/friendly_neighbor
Server that responds to ARP (IPv4) and NDP (IPv6) requests on behalf of neighboring machines. Useful for keeping sleeping machines accessible on the network.
https://github.com/danielpgross/friendly_neighbor
arp homeserver ndp networking wake-on-lan
Last synced: 7 days ago
JSON representation
Server that responds to ARP (IPv4) and NDP (IPv6) requests on behalf of neighboring machines. Useful for keeping sleeping machines accessible on the network.
- Host: GitHub
- URL: https://github.com/danielpgross/friendly_neighbor
- Owner: danielpgross
- License: mit
- Created: 2023-08-31T20:08:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-10T15:33:23.000Z (about 1 year ago)
- Last Synced: 2023-10-10T20:12:47.992Z (about 1 year ago)
- Topics: arp, homeserver, ndp, networking, wake-on-lan
- Language: Zig
- Homepage: https://danielpgross.github.io/friendly_neighbor/howto-sleep-wake-on-demand
- Size: 197 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Friendly Neighbor
[![friendly-neighbor](https://snapcraft.io/friendly-neighbor/badge.svg)](https://snapcraft.io/friendly-neighbor)
Friendly Neighbor is a network server that responds to ARP and NDP requests on behalf of other LAN devices. Think of it as applying a set of static IP-to-MAC address mappings for all devices on your LAN.
Its main use-case is enabling network packets to be sent to sleeping machines so that they can be woken up on demand using wake-on-unicast. [This blog post](https://dgross.ca/blog/linux-home-server-auto-sleep/) explains the technique in detail.
## Features
* Super lightweight and performant, built with Zig
* Built with libpcap for efficient, low-overhead packet filtering
* Supports different CPU architectures, including x86_64 and Raspberry Pi (ARM64)
* Distributed as a universal [Snap package](https://snapcraft.io/) for easy installation on many Linux distros
* Can respond on behalf of multiple machines at once
* IPv4 and IPv6 support## Prerequisites
* Linux (any distro supporting Snap packages, kernel version 2.6.27+)
* Wired Ethernet network interface## Installation
[![Get it from the Snap Store](https://snapcraft.io/static/images/badges/en/snap-store-black.svg)](https://snapcraft.io/friendly-neighbor)
```
sudo snap install friendly-neighbor
sudo snap connect friendly-neighbor:hardware-observe
sudo snap connect friendly-neighbor:network-control
# Replace the values for "mac-ip-mappings" and "interface-name" below with your real ones:
sudo snap set friendly-neighbor mac-ip-mappings=AA:BB:CC:DD:EE:FF,10.0.8.3 interface-name=eth0
sudo snap restart friendly-neighbor
```The Snap package is configured to run automatically Friendly Neighbor as a network service (daemon). After performing the steps above, the service should be running and should automatically start on subsequent system startups.
## Usage
The following usage details are only relevant when running the service directly. If using the Snap package, service parameters are set using `snap set friendly-neighbor ...`
```
USAGE
friendly_neighbor [-hv] [-i ] [-m ...] [--mappings ]OPTIONS
-i, --interface
Name of network interface on which to listen and send packets-m, --mapping ...
One or more MAC to IP (v4 or v6) address mappings, each in the
format ,--mappings
A single string containing one or more mappings in the format , with mappings separated by a space-h, --help
Display this help and exit-v, --version
Print program version and exitEXAMPLES
friendly_neighbor -i eth0 \
-m 11:22:33:44:55:66,192.168.1.2 \
-m 11:22:33:44:55:66,fd12:3456:789a:1::1friendly_neighbor -i eno1 --mappings \
"AA:BB:CC:DD:EE:FF,10.0.8.3 AA:BB:CC:DD:EE:FF,fd9a:bc83:57e4:2::1"
```## Contributing
Contributions are welcome, pull requests and issues can be created at https://github.com/danielpgross/friendly_neighbor## License
MITHappy networking, and remember to be a friendly neighbor! 🌐💻