Podman With IPV6

Author Avatar
Young Hug Dec 17, 2020

I find the podman doesn’t support port forward of IPV6. And I try to find a workaround. The first thing comes to my mind is IPTable. You can go here directly to get the solution.

Check Command

  1. List the opening port netstat -plant

  2. check ::1:{port}

  3. Using netcat to verify in a host with IPV6

Solution

I find there is a quick way to do the port forward of IPV6 with socat.

1
2
3
4
5
6
7
#install socat
yum install -y socat

# forward the port of ipv6
## ipv6-v6only=1 is a key part
## & makes the socat run background
socat -d -d TCP6-LISTEN:3000,ipv6-v6only=1,reuseaddr,fork TCP4:localhost:3000 &

This blog is under a CC BY-NC-SA 3.0 Unported License
Link to this article: https://younggod.netlify.app/2020/12/17/practice/PodmanWithIPV6/