Skip to content

Commit

Permalink
added port 80 to ddos protected port list
Browse files Browse the repository at this point in the history
  • Loading branch information
r-caamano committed Apr 16, 2024
1 parent c8e70ed commit 72ae418
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All notable changes to this project will be documented in this file. The format
- Added map to track tcp syn count for packets sent to the firewall ip address on port 443.
- Ddos protection is meant for the FW host accept/deny logic was moved to first bpf program and
and addresses in ddos_protect_map supersede fw rules for locally terminated service on port 443.
Currently only for port 443 and 6262.
Currently only for ports 80,443 and 6262.

# [0.5.14] - 2024-04-02

Expand Down
4 changes: 2 additions & 2 deletions src/zfw_tc_ingress.c
Original file line number Diff line number Diff line change
Expand Up @@ -942,8 +942,8 @@ int bpf_sk_splice(struct __sk_buff *skb){
goto assign;
}
bpf_sk_release(sk);
if(((bpf_ntohs(tuple->ipv4.dport) == 443) || (bpf_ntohs(tuple->ipv4.dport) == 6262))
&& local_ip4 && local_ip4->count){
if(((bpf_ntohs(tuple->ipv4.dport) == 80) || (bpf_ntohs(tuple->ipv4.dport) == 443)
|| (bpf_ntohs(tuple->ipv4.dport) == 6262)) && local_ip4 && local_ip4->count){
uint8_t addresses = 0;
if(local_ip4->count < MAX_ADDRESSES){
addresses = local_ip4->count;
Expand Down

0 comments on commit 72ae418

Please sign in to comment.