Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gamemann/TC-IPIP-Mapper
TC programs aimed to add support for multiple remote hosts in IPIP tunnels.
https://github.com/gamemann/TC-IPIP-Mapper
bpf control ebpf ipip tc traffic traffic-control
Last synced: 3 months ago
JSON representation
TC programs aimed to add support for multiple remote hosts in IPIP tunnels.
- Host: GitHub
- URL: https://github.com/gamemann/TC-IPIP-Mapper
- Owner: gamemann
- License: mit
- Created: 2021-02-28T02:28:56.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T22:33:40.000Z (about 1 year ago)
- Last Synced: 2024-10-11T02:25:18.192Z (3 months ago)
- Topics: bpf, control, ebpf, ipip, tc, traffic, traffic-control
- Language: C
- Homepage: https://deaconn.net/
- Size: 40 KB
- Stars: 28
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TC IPIP Mapper (WIP)
## Description
A project aimed to add support for multiple remotes on an IPIP tunnel. This project consist of two TC programs (one for ingress and the other for egress).The main goal of the TC ingress program is to map the client IP (inner IP header's source IP address) to the remote IP (the outer IP header's source address).
When outgoing IPIP packets are sent back out, it will replace the outer IP header's destination IP address with the mapped remote IP if it exist. If it doesn't, the packet will go out unchanged.
An example where this is useful is if you're utilizing IPIP tunnels with an Anycast network and want the traffic to go back the same POP server it came in with.
## Command Line Usage
The only command line option is `-i --dev` which determines which interface to attach to. An example of using the `ipipmapper` loader may be found below.```
./ipipmapper --dev ens18
```## Requirements
The `make`, `clang`, `llvm`, `libelf-dev`, and `gcc-multilib` packages are required.On Debian/Ubuntu-based systems, these may be installed using the following command.
```bash
sudo apt install -y make clang llvm libelf-dev gcc-multilib
```## Installing
You may use `git` and `make` to install this project onto your server. I'd suggest the following commands for downloading and installing.```
git clone --recursive https://github.com/gamemann/TC-IPIP-Mapper.git # Recursive will download LibBPF.
cd TC-IPIP-Mapper/
make && make install
```If you want to enable this via `systemd`, I'd suggest modifying the `/etc/systemd/system/IPIPMapper.service` file after install and ensure it is set to use the correct interface via the `-i` flag. Afterwards, you may execute the following commands.
```
systemctl enable IPIPMapper # Enables the program on startup.
systemctl start IPIPMapper # Starts the program via systemd.
```## Credits
* [Christian Deacon](https://github.com/gamemann)