Bootstrap

Jenkins设置防火墙规则允许访问本机IP端口

netsh advfirewall firewall add rule name="Jenkins_8080" dir=in action=allow protocol=TCP localport=8080

命令组成部分

  • netsh - 网络配置命令行工具
  • advfirewall firewall - 高级防火墙配置
  • add rule - 添加新规则
  • name="Jenkins_8080" - 规则名称
  • dir=in - 入站规则(允许外部连接进入)
  • action=allow - 允许连接
  • protocol=TCP - TCP协议
  • localport=8080 - 本地端口8080

命令作用

  • 创建一个Windows防火墙规则
  • 允许外部通过TCP协议访问本机的8080端口
  • 通常用于允许外部访问Jenkins服务
  • 规则名称为"Jenkins_8080"方便识别和管理

相关常用参数

  • dir=out - 出站规则
  • enable=yes/no - 启用/禁用规则
  • remoteip=地址 - 指定允许的远程IP
  • program=路径 - 指定程序路径
;