firewall:基于iptables的防火墙

  • S0_775831
    了解作者
  • 3.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-20 10:47
    上传日期
防火墙 用于基于iptables设置防火墙的工具 ##设置 安装ipset包 ##文件 firewall.sh:主脚本,需要运行 blacklist.txt:不良IP列表将被阻止(每行一个IP /网络) whitelist.txt:将接受良好IP列表(每行一个IP /网络) ##用法 克隆到您的服务器 git clone https://github.com/vnlinux/firewall.git 在firewall.sh中编辑tcp_incoming,udp_incoming,tcp_outgoing,udp_outgoing 将IP地址添加到blacklist.txt,whitelist.txt(如果有) 启动防火墙 sudo sh firewall.sh start 停止防火墙 sudo sh firewall.sh stop 启动防火墙,并在5分钟后将其停止(测试模
firewall-master.zip
  • firewall-master
  • blacklist.txt
    54B
  • blockchina.sh
    463B
  • README.md
    771B
  • whitelist.txt
    29B
  • firewall.sh
    6.5KB
内容介绍
firewall ======== Tool for setting up your firewall based on iptables ##Setup - install ipset package ##Files - firewall.sh: main script, need to run - blacklist.txt: list of bad ips will be blocked (one ip/network per line) - whitelist.txt: list of good ips will be accepted (one ip/network per line) ##Usage Clone to your server ```sh git clone https://github.com/vnlinux/firewall.git ``` - Edit tcp_incoming, udp_incoming, tcp_outgoing, udp_outgoing in firewall.sh - Add ip address to blacklist.txt, whitelist.txt if you have Start firewall ```sh sudo sh firewall.sh start ``` Stop firewall ```sh sudo sh firewall.sh stop ``` Start firewall, and stop it after 5 minutes (testing mode) ```sh sudo sh firewall.sh start; (sleep 300; sudo sh firewall.sh stop) & ```
评论
    相关推荐