iv-org / smart-ipv6-rotator

IPv6 rotator for specific subnets - unblock restrictions on IPv6 enabled websites (Google by default but customizable for others)
GNU Affero General Public License v3.0
75 stars 11 forks source link

Help Needed Configuring the IPv6 Rotator #22

Closed Nanianmichaels closed 5 months ago

Nanianmichaels commented 5 months ago

Hello there.

First of all, apologies for opening an issue, but I don't have Matrix or IRC.

I think I followed the IPv6 rotator instructions correctly but apparently I must have done something wrong, because while I can issue the IPv6 check command on the Indivious container, the ping command always fails, and I cannot access the external URL for the service (using a Cloudflare tunnel).

I have:

I would like to know what I might be missing, please.

For completeness, here's a redacted copy of the Docker Compose file:

services:

  invidious:
    container_name: indivious
    image: quay.io/invidious/invidious:latest
    # image: quay.io/invidious/invidious:latest-arm64 # ARM64/AArch64 devices
    restart: unless-stopped
    ports:
      #- "127.0.0.1:30000:3000"
      - "30000:3000"
    environment:
      #- TZ=Europe/Lisbon
      # Please read the following file for a comprehensive list of all available
      # configuration options and their associated syntax:
      # https://github.com/iv-org/invidious/blob/master/config/config.example.yml
      INVIDIOUS_CONFIG: |
        db:
          dbname: invidious
          user: [redacted]
          password: [redacted]
          host: invidious-db
          port: 5432
        check_tables: true
        # external_port:
        domain: [redacted]
        https_only: true
        # statistics_enabled: false
        hmac_key: "[redacted]"
        registration_enabled: false
        force_resolve: ipv6
    healthcheck:
      test: wget -nv --tries=1 --spider http:127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
      interval: 30s
      timeout: 5s
      retries: 2
    logging:
      options:
        max-size: "1G"
        max-file: "4"
    depends_on:
      - invidious-db
    networks:
      - default

  invidious-db:
    container_name: indivious-db
    image: docker.io/library/postgres:14
    restart: unless-stopped
    networks:
      - default
    volumes:
      - [redacted]:/var/lib/postgresql/data
      - [redacted]:/config/sql
      - [redacted]:/docker-entrypoint-initdb.d/init-invidious-db.sh
    environment:
      #- TZ=[redacted]
      POSTGRES_DB: invidious
      POSTGRES_USER: [redacted]
      POSTGRES_PASSWORD: [redacted]
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]

networks:
  default:
    enable_ipv6: true
    ipam:
      config:
        - subnet: 2001:0DB9::/112
          gateway: 2001:0DB9::1

Lastly, not sure if relevant, but I have noticed that each time I restart the service, the db container complains with the line "invalid record length at 0/11BACF98: wanted 24, got 0".

Thank you in advance for any help you might be able to give me.

unixfox commented 5 months ago
  • Confirmed the host machine still has IPv6 connectivity. However, running the "curl -m 5 ipv6.icanhazip.com" command returns my ISP-assigned IPv6 address, and not the new one created by the rotator script (not sure if relevant).

This is explained in the "how the script" works: https://github.com/iv-org/smart-ipv6-rotator?tab=readme-ov-file#how-does-this-script-work

It configures route for only using that new random IPv6 address for the specific IPv6 subnets (Google ipv6 ranges by default). This way your current ipv6 network configuration is untouched and any change done by the script is temporary.

Nanianmichaels commented 5 months ago

I might have not been sufficiently clear in my question, my apologies.

My issue is lack of IPv6 connection within the container Indivious container, not the host machine (" while I can issue the IPv6 check command on the Indivious container, the ping command always fails, and I cannot access the external URL for the service").

Is that issue out of scope for this issue/question tracker?

unixfox commented 5 months ago

No idea, if you have followed the guide (https://docs.invidious.io/ipv6-rotator/) and have the latest docker version (https://get.docker.com/) everything should work fine.