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

publish to ipv6 - error from slirp4netns #13229

Closed
HidingCherry opened this issue Feb 14, 2022 · 1 comment
Closed

publish to ipv6 - error from slirp4netns #13229

HidingCherry opened this issue Feb 14, 2022 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. slirp4netns Bug is in slirp4netns

Comments

@HidingCherry
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

publish cannot listen to IPv6 addresses

Steps to reproduce the issue:

podman run \
--net slirp4netns:port_handler=slirp4netns,enable_ipv6=true,outbound_addr6=2001:xxxx:xxxx:xxxx::1,allow_host_loopback=true \
-p 8080:80 \
-p 8443:443 \
-p [::]:8080:80 \
-p [::]:8443:443 \
docker.io/library/nginx:1-alpine

Describe the results you received:

Error: unable to start container "c718732c73b18023bad0eed815403dd0b088c98e142ea8a93b7f06fc62d55274": error from slirp4netns while setting up port redirection: map[desc:bad request: add_hostfwd: bad arguments.host_addr]

Describe the results you expected:
actually listen to all ipv6 addresses on ports 8080 and 8443 available on the system

Additional information you deem important (e.g. issue happens only occasionally):
It doesn't matter if I put a IPv6 in there (e.g. [2001:xxxx:xxxx:xxxx::1]) - the error stays the same.
Maybe IPv6 in the publish parameter is not parsed/passed through correctly?

Output of podman version:

$ podman version
Client:       Podman Engine
Version:      4.0.0-dev
API Version:  4.0.0-dev
Go Version:   go1.17.7
Git Commit:   eb19a7582e445d120ea2c4fd166313179d8c10a8
Built:        Sun Feb 13 22:11:21 2022
OS/Arch:      linux/amd64

Output of podman info --debug:

$ podman info --debug
host:
  arch: amd64
  buildahVersion: 1.24.1
  cgroupControllers:
  - memory
  - pids
  cgroupManager: systemd
  cgroupVersion: v2
  conmon:
    package: /usr/bin/conmon is owned by conmon 1:2.1.0-1
    path: /usr/bin/conmon
    version: 'conmon version 2.1.0, commit: bdb4f6e56cd193d40b75ffc9725d4b74a18cb33c'
  cpus: 4
  distribution:
    distribution: arch
    version: unknown
  eventLogger: journald
  hostname: xxx
  idMappings:
    gidmap:
    - container_id: 0
      host_id: 1002
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
    uidmap:
    - container_id: 0
      host_id: 1002
      size: 1
    - container_id: 1
      host_id: 165536
      size: 65536
  kernel: 5.15.21-hardened1-1-hardened
  linkmode: dynamic
  logDriver: journald
  memFree: 146345984
  memTotal: 4035608576
  networkBackend: cni
  ociRuntime:
    name: crun
    package: /usr/bin/crun is owned by crun 1.4.2-1
    path: /usr/bin/crun
    version: |-
      crun version 1.4.2
      commit: f6fbc8f840df1a414f31a60953ae514fa497c748
      spec: 1.0.0
      +SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +YAJL
  os: linux
  remoteSocket:
    exists: true
    path: /run/user/1002/podman/podman.sock
  security:
    apparmorEnabled: false
    capabilities: CAP_CHOWN,CAP_DAC_OVERRIDE,CAP_FOWNER,CAP_FSETID,CAP_KILL,CAP_NET_BIND_SERVICE,CAP_SETFCAP,CAP_SETGID,CAP_SETPCAP,CAP_SETUID,CAP_SYS_CHROOT
    rootless: true
    seccompEnabled: true
    seccompProfilePath: /etc/containers/seccomp.json
    selinuxEnabled: false
  serviceIsRemote: false
  slirp4netns:
    executable: /sbin/slirp4netns
    package: /usr/bin/slirp4netns is owned by slirp4netns 1.1.12-1
    version: |-
      slirp4netns version 1.1.12
      commit: 7a104a101aa3278a2152351a082a6df71f57c9a3
      libslirp: 4.6.1
      SLIRP_CONFIG_VERSION_MAX: 3
      libseccomp: 2.5.3
  swapFree: 0
  swapTotal: 0
  uptime: 20h 45m 20.9s (Approximately 0.83 days)
plugins:
  log:
  - k8s-file
  - none
  - passthrough
  - journald
  network:
  - bridge
  - macvlan
  - ipvlan
  volume:
  - local
registries:
  search:
  - ghcr.io
  - quay.io
  - docker.io
store:
  configFile: /home/pods/.config/containers/storage.conf
  containerStore:
    number: 6
    paused: 0
    running: 6
    stopped: 0
  graphDriverName: btrfs
  graphOptions: {}
  graphRoot: /home/pods/.local/share/containers/storage
  graphStatus:
    Build Version: 'Btrfs v5.16.1 '
    Library Version: "102"
  imageCopyTmpDir: /var/tmp
  imageStore:
    number: 5
  runRoot: /run/user/1002/containers
  volumePath: /home/pods/.local/share/containers/storage/volumes
version:
  APIVersion: 4.0.0-dev
  Built: 1644786681
  BuiltTime: Sun Feb 13 22:11:21 2022
  GitCommit: eb19a7582e445d120ea2c4fd166313179d8c10a8
  GoVersion: go1.17.7
  OsArch: linux/amd64
  Version: 4.0.0-dev

Package info (e.g. output of rpm -q podman or apt list podman):

$ pacman -Qs podman-git
local/podman-git 4.0.0_dev.r14270.geb19a7582-1
    Tool and library for running OCI-based containers in pods (git)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes (ipv6 is not mentioned there)

Additional environment details (AWS, VirtualBox, physical, etc.):
physical

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Feb 14, 2022
@Luap99
Copy link
Member

Luap99 commented Feb 14, 2022

This is a slirp4netns issue, you cannot use the slirp4netns port forwarder with ipv6 (rootless-containers/slirp4netns#253)

You have to use rotlesskit for ipv6 forwarding

@Luap99 Luap99 closed this as completed Feb 14, 2022
@Luap99 Luap99 added the slirp4netns Bug is in slirp4netns label Feb 14, 2022
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 21, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. slirp4netns Bug is in slirp4netns
Projects
None yet
Development

No branches or pull requests

2 participants