https://github.com/hyperxpro/cs-fw
CS-FW is a high-performance CS 1.6 firewall based on Linux XDP.
https://github.com/hyperxpro/cs-fw
counter-strike counter-strike-global-offensive ddos flood rust-lang source-engine vse xdp
Last synced: 5 months ago
JSON representation
CS-FW is a high-performance CS 1.6 firewall based on Linux XDP.
- Host: GitHub
- URL: https://github.com/hyperxpro/cs-fw
- Owner: hyperxpro
- License: gpl-3.0
- Created: 2023-01-14T16:06:58.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-15T15:28:01.000Z (over 2 years ago)
- Last Synced: 2025-03-29T22:21:32.455Z (12 months ago)
- Topics: counter-strike, counter-strike-global-offensive, ddos, flood, rust-lang, source-engine, vse, xdp
- Language: Rust
- Homepage:
- Size: 147 KB
- Stars: 9
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CS-FW
CS-FW is a high-performance CS 1.6 firewall based on Linux XDP.
# System Requirements
OS: Ubuntu 22.04 LTS
Architecture: x86_64
Memory: 2 GB
### Run:
```bash
$ sudo ./csfw -i eth0 -p 127.0.0.1:11011
```
### Unload
```bash
$ sudo ip link set dev eth0 xdp off
```
# Protection Channels
1. Allows CS 1.6 game packets only. It tracks traffic and maintains list of genuine clients only and discards all garbage packets.
2. Drops packets from common UDP reflectors.
```rust
if sport == 17 || // tftp
sport == 19 || // chargen
sport == 53 || // dns
sport == 111 || // rpcbind
sport == 123 || // ntp
sport == 137 || // netbios-ns
sport == 161 || // snmp
sport == 389 || // ldap
sport == 520 || // rip
sport == 751 || // kerberos
sport == 1434 || // ms-sql-s
sport == 1900 || // ssdp
sport == 5353 || // mdns
sport == 6881 || // bittorrent
sport == 11211 { // memcached
return Ok(XdpAction::Drop);
}
```
### Building from Source:
See CI [Workflow file](https://github.com/hyperxpro/cs-fw/blob/main/.github/workflows/build.yml) for more details.