Add switch to output as NGINX rule

Đang mở
#19 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
Nửa ngày
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
nginx, shell
Lĩnh vực
cli

Hướng nghiên cứu

The issue gives a working pipeline: it greps the generated ipset/*-ipset-*.sh scripts for lines containing -A, takes field 4 (the CIDR), and formats each as deny <cidr>;. Start by reading one generated ipset script to confirm that layout, then find the generator that writes those scripts. Done means the scripts can emit the same NGINX deny lines through a switch, with no separate grep/awk/sed step. The issue does not name the switch or the output file, so check the maintainers' preference before choosing either.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

asn-to-ipset-script.sh cc-to-ipset-script.sh enhancement help wanted ip-to-ipset-script.sh

I can convert the output of the ipset scripts into the format of an NGINX deny rule with this command:

cat ipset/*-ipset-20260628.sh | grep " -A" | awk '{ print $4 }' | sed 's/^/deny /g;s/$/;/g'

Adding the output of that command to part of the NGINX config would deny traffic to those CIDR addresses from the web server layer.

It would be nice if the user could easily modify the script to provide that output without needing to run a secondary command.

Ngôn ngữ chính
Shell
Star
7
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TechnologyClassroom/firewallblockgen

Tất cả issue của TechnologyClassroom/firewallblockgen

Issue tương tự

Thêm issue về Shell/Bash

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.