xdp-tutorial
xdp-tutorial copied to clipboard
need a few features for ddos protection. pls help
need most basic anti-ddos protection feature
can i buy u coffees to expand on these area?
a) i have created multiple processes for each port to handle incoming requests per cpu. e.g. if 2 cpus 8080, 8081, if 4 cpus, spawn 8080,8081,8082,8083. if 32 cpus, spawn 8080-8080+32 etc possible to do a way to crc / xxhash MOD/% (number of CPU threads) the incoming ip address and divert to the port number of the moded value? e.g. crc(123.123.123.123)%4 = 5 for example, and incoming address 123.123.123.123 -> port 8080+5 = 8085 would like can config the initial port num. need listening to port 80 and 443 actually for http
i saw the solution on port rewriting on packet-solutions folder. i'm terrible with C language. can u pls provide the code? i know it's just a few lines of code for u easy.
b) the programs listening to the ports has been customized to block ips based on certain rules and blocked ips are currently added to "ipset" list. how do i add IP to BPF_MAP_TYPE_LRU_HASH such that those in the LRU hash will be blocked / XDP_DROP?
c) a way to delete IPs in LRU hash list. that's all actually.
was about to write one but u have done so much already. great work! hope to see it in production soon!
would like to buy u coffees if u can make this happen. do mention where to buy u the coffees. thx in advance!