目录
目录README.md

SailFirewall

Linux firewall powered by eBPF and XDP

Requirements

  • Go 1.16+
  • Linux Kernel 4.15+

Support feature

  • IPv4
  • IPv6
  • TCP
  • UDP

Please contribute other protocols support

Usage

make
# change lo if you need
sudo ./SailFirewall -iface lo

API

Add rule

POST /api/v1/rule

{
    "SrcAddr": "127.0.0.1",
    "DstPort": 8000,
    "Proto": 6
}

Proto 6 is TCP

{
    "SrcAddr": "127.0.0.1",
    "DstPort": 8000,
    "Proto": 17
}

Proto 17 is UDP

Get rule

GET /api/v1/rule

{
    "SrcAddr": "127.0.0.1",
    "DstPort": 8000,
    "Proto": 6
}

Delete rule

DELETE /api/v1/rule

{
  "SrcAddr": "127.0.0.1",
  "DstPort": 8000,
  "Proto": 6
}

Reference

EtherType

IPv4

IPv6

IP protocol numbers

TCP

UDP

关于

Linux firewall powered by eBPF and XDP

41.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号