Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议:为Docker部署方式添加IPv6(双栈)支持 #100

Open
CreeperLKF opened this issue Dec 13, 2024 · 1 comment
Open

建议:为Docker部署方式添加IPv6(双栈)支持 #100

CreeperLKF opened this issue Dec 13, 2024 · 1 comment

Comments

@CreeperLKF
Copy link

在具有公网IPv4和IPv6的Ubuntu 22.04上使用Docker部署uuwaf,虽然可以通过IPv6访问,但其实是主机转发过去的,来源IP只能看到内网IP 172.x.x.x。
如果要添加IPv4-IPv6双栈支持,至少需要修改以下配置:

  1. docker-compose.yaml的networks里面启用IPv6
    networks:
    wafnet:
    name: wafnet
    driver: bridge
    ipam:
    driver: default
    config:
    - gateway: 172.31.255.1
    subnet: 172.31.255.0/24
    driver_opts:
    com.docker.network.bridge.name: wafnet

    这里添加enable_ipv6: true,这样可以使得Ubuntu不会主动转发(效果上就是这个wafnet驱动从类似CentOS防火墙的external移动到了internal)。
  2. 在*/uuwaf/conf/uuwaf.conf*里面启用IPv6,具体而言,对应地修改resolver 127.0.0.11 ipv6=on;listen [::]:80 default_server reuseport;以及listen [::]:443 ssl default_server reuseport;

此时防火墙可以看到正确的IP。

@Safe3
Copy link
Owner

Safe3 commented Dec 14, 2024

好的,谢谢反馈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants