Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Use dual stack VPS as ipv4 to ipv6 proxy
New on LowEndTalk? Please Register and read our Community Rules.

Use dual stack VPS as ipv4 to ipv6 proxy

szymonpszymonp Member

Basically I want to use iptables to redirect all traffic on a specific ipv4 port on a vps to a different vps on a ipv6 port. I have managed to do this with socat:
socat TCP4-LISTEN:1080,fork,su=nobody TCP6:[example ipv6]:3389
I want to do this via iptables. Is it possible?

Comments

  • TerokNorTerokNor Member

    I think you cant do that natively with iptables. But alternatively you can use 6tunnel, a vpn or ssh forwarding.

  • szymonpszymonp Member

    @TerokNor said:
    I think you cant do that natively with iptables. But alternatively you can use 6tunnel, a vpn or ssh forwarding.

    is it possible to make the socat run at startup in the background? I tried looking online but all answers are outdated

  • TerokNorTerokNor Member

    This seems up to date to me.

    https://getridbug.com/unix-linux/how-to-run-socat-as-a-systemd-service-to-bridge-two-remote-unix-sockets/

    Or you could enable /etc/rc.local if it's supported.

    Thanked by 1szymonp
  • ralfralf Member

    @szymonp said:
    I want to do this via iptables. Is it possible?

    If this is just because one VPS is IPv6 only, you might find it easier to just set up wireguard between the two machines and then just use iptables to route across that, and listen on the wireguard IPv4 address on the other end.

Sign In or Register to comment.