Pndpd/README.md

56 lines
2.1 KiB
Markdown
Raw Permalink Normal View History

2021-12-22 07:11:12 -05:00
# PNDPD - NDP Responder + Proxy
2021-12-20 14:58:28 -05:00
## Features
2021-12-25 22:25:58 +01:00
- **Efficiently** process incoming packets using bpf (which runs in the kernel)
2021-12-21 06:48:27 -05:00
- Respond to all NDP solicitations on an interface
2021-12-25 22:25:58 +01:00
- **Respond** to NDP solicitations for whitelisted addresses on an interface
- **Proxy** NDP between interfaces with an optional whitelist
- Optionally determine whitelist **automatically** based on the IPs assigned to the interfaces
2021-12-21 06:48:27 -05:00
- Permissions required: root or CAP_NET_RAW
2021-12-25 22:25:58 +01:00
- Easily expandable with modules
2021-12-21 06:48:27 -05:00
2021-12-25 08:29:57 -05:00
## Installing & Updating
2021-12-25 22:25:58 +01:00
1) Download the latest release from the releases page and move the binary to the ``/urs/bin/`` directory
2) For systemd users: Install the service unit file
2021-12-25 08:29:57 -05:00
````
2021-12-25 22:25:58 +01:00
wget https://raw.githubusercontent.com/Kioubit/pndpd/master/pndpd.service
2021-12-25 08:29:57 -05:00
mv pndpd.service /usr/lib/systemd/system/
systemctl enable pndpd.service
````
3) Download and install the config file
````
2021-12-25 22:25:58 +01:00
wget https://raw.githubusercontent.com/Kioubit/pndpd/master/pndpd.conf
2021-12-25 08:29:57 -05:00
mkdir -p /etc/pndpd/
mv pndpd.conf /etc/pndpd/
````
4) Edit the config at ``/etc/pndpd/pndpd.conf`` and then start the service using ``service pndpd start``
## Manual Usage
2021-12-21 06:48:27 -05:00
````
2021-12-24 11:23:39 -05:00
pndpd config <path to file>
pndpd respond <interface> <optional whitelist of CIDRs separated by a semicolon>
pndpd proxy <interface1> <interface2> <optional whitelist of CIDRs separated by a semicolon applied to interface2>
2021-12-22 07:06:22 -05:00
````
More options and additional documentation in the example config file (pndpd.conf).
2021-12-22 07:06:22 -05:00
2021-12-25 09:28:59 -05:00
## Developing
### Adding Modules
2021-12-22 07:06:22 -05:00
It is easy to add functionality to PNDPD. For additions outside the core functionality you only need to keep the following methods in mind:
2021-12-21 06:48:27 -05:00
````
2021-12-22 07:06:22 -05:00
package main
import "pndpd/pndp"
2021-12-22 07:14:51 -05:00
pndp.ParseFilter(f string) []*net.IPNet
2021-12-22 07:06:22 -05:00
responderInstance := pndp.NewResponder(iface string, filter []*net.IPNet, autosenseInterface string)
responderInstance.Start()
responderInstance.Stop()
2021-12-22 07:12:13 -05:00
proxyInstance := pndp.NewProxy(iface1 string, iface2 string, filter []*net.IPNet, autosenseInterface string)
proxyInstance.Start()
proxyInstance.Stop()
2021-12-22 07:11:12 -05:00
````
2021-12-25 09:28:59 -05:00
New functionality should be implemented as a module. You will find an example module under ``modules/example/``.
2021-12-24 11:23:39 -05:00
Pull requests are welcome for any functionality you add.