TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Onetun – Access your WireGuard network from anywhere

92 pointsby momotherealover 3 years ago

6 comments

momotherealover 3 years ago
Hey everyone, I wrote this tool because I wanted to be able to access ports running on peers in my WireGuard network from any computer&#x2F;server; without having to install WireGuard locally and without having root access (no iptables configs).<p>So as long as you have a private key &amp; peer IP dedicated for your roaming needs, you&#x27;ll be able to forward a local port to a port on a secured peer.<p>This can be useful for a few other use-cases, like exposing services to the Internet from a separate server that doesn&#x27;t have root access (like a non-privileged container).<p>I&#x27;ve also gotten feedback to enable reverse-tunneling (making a port accessible on a peer that forwards to a port running locally), which enables a few more use-cases. I&#x27;m looking for any more ideas or feedback that would fit in this tool!<p>I&#x27;ve described how the internals work in the README. It&#x27;s still a proof-of-concept right now but I listed my little roadmap in the issues: reverse-tunneling, UDP support, multi-port-forwarding, etc. Happy to answer any questions.
ignoramousover 3 years ago
A note: wireguard-go (the official userspace impl in golang) can do this since several months back. It uses gVisor&#x27;s netstack as a tcp&#x2F;udp provider to forward connections to its peer (compared to whitequark&#x27;s smoltcp in case of onetun).<p>Here&#x27;s a demonstration of both a http-client and a http-server running over wireguard (a poor man&#x27;s QUIC, if you will): <a href="https:&#x2F;&#x2F;github.com&#x2F;WireGuard&#x2F;wireguard-go&#x2F;tree&#x2F;master&#x2F;tun&#x2F;netstack&#x2F;examples" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;WireGuard&#x2F;wireguard-go&#x2F;tree&#x2F;master&#x2F;tun&#x2F;ne...</a><p>fly.io wrote about such a setup not long ago too: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26315695" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26315695</a><p>And tailscale.com similarly uses wireguard with netstack to impl functionality unavailable on non-Linux&#x2F;xBSD platforms: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28261683" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=28261683</a>
评论 #28911376 未加载
评论 #28910539 未加载
philsnowover 3 years ago
The name cries out for an icon derived from a &#x27;won ton&#x27; (americans usually pronounce it wahn tawn but the canto pronunciation is exactly like &#x27;one tun&#x27;).<p><a href="https:&#x2F;&#x2F;www.google.com&#x2F;search?q=won%20ton&amp;tbm=isch&amp;tbs=itp:clipart" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;search?q=won%20ton&amp;tbm=isch&amp;tbs=itp:c...</a>
评论 #28910816 未加载
johnklosover 3 years ago
Curious - why an extra program when ssh already does this? (ssh -J, -g, -R, -L, et cetera)
评论 #28909167 未加载
toomuchtodoover 3 years ago
Thanks for building this, very cool. Like UPnP for your wireguard network.
aftbitover 3 years ago
Ah I was initially hoping this would help me expose peers to each other from behind NAT or restrictive firewalls ala tailscale.
评论 #28915937 未加载