Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gamemann/ipipdirect-tc
Sends outgoing IPIP packets back to the client directly instead of back through the IPIP tunnel/forwarding server. Uses TC egress filter for fast packet processing.
https://github.com/gamemann/ipipdirect-tc
bpf direct ebpf egress ipip linux-tc tc traffic-control
Last synced: about 2 months ago
JSON representation
Sends outgoing IPIP packets back to the client directly instead of back through the IPIP tunnel/forwarding server. Uses TC egress filter for fast packet processing.
- Host: GitHub
- URL: https://github.com/gamemann/ipipdirect-tc
- Owner: gamemann
- Created: 2020-04-02T23:07:24.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-09-13T11:06:59.000Z (3 months ago)
- Last Synced: 2024-10-11T02:25:06.022Z (2 months ago)
- Topics: bpf, direct, ebpf, egress, ipip, linux-tc, tc, traffic-control
- Language: C
- Homepage: https://moddingcommunity.com/
- Size: 284 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# IPIP Direct (TC)
## Description
A program made to attach to the TC hook using the egress filter. This program makes it so any outgoing IPIP packets are sent directly back to the client instead of back through the IPIP tunnel. In cases where you don't need the end-application replies to go back through the forwarding server/IPIP tunnel, this is very useful and will result in less load on the forwarding server. With that said, in other cases it can result in less latency and more.## Usage
Usage is as follows:```
./IPIPDirect_Loader
```Example:
```
./IPIPDirect_Loader ens18
```## Installation
Use the MAKE file to install the program. These commands should do:```
make
make install
```You may also clean the installation by executing:
```
make clean
```## Systemd File
A `systemd` file is located in the other/ directory and is installed via `make install`. You will need to edit the system file if you are using an interface other than `ens18`.You may enable the service by executing so it'll start on bootup:
```
systemctl enable IPIPDirect
```You may start/stop/restart the service by executing:
```
systemctl restart IPIPDirect # Restart service.
systemctl stop IPIPDirect # Stop service.
systemctl start IPIPDirect # Start service.
```## Kernel Requirements
Kernel >= 5.3 is required for this. Newer kernels add the `BPF_ADJ_ROOM_MAC` mode to the `bpf_skb_adjust_room()` function which is needed for this program to work correctly.## Notes
When compiling, you may need to copy `/usr/src/linux-headers-xxx/include/uapi/linux/bpf.h` to `/usr/include/linux/bpf.h`. For some reason, newer kernels don't have an up-to-date `/usr/include/linux/bpf.h` file. I'm unsure if this is intentional or a bug. However, I got the program to compile properly by copying that file.**Update** - Apparently this is only a bug on Ubuntu.
## Credits
* [Christian Deacon](https://www.linkedin.com/in/christian-deacon-902042186/) - Creator