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.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

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

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

  • @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

  • 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.