this post was submitted on 22 Nov 2023
10 points (85.7% liked)

Selfhosted

40183 readers
537 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

I've made wireguard tu nel out to VPS (to circumvent CGNAT). Dns server works, web server + Gitea, Jellyfin,.. works. All the stuff running on my thin Ubuntu client. What doesn't work is forwarding the RDP port to my windows machine. No firewall on the windows machine. Used to work before CGNAT got enabled by my ISP. I've tried also UDP port, but still no connection.

Here is my wg0 conf:

[Interface] PrivateKey = ..... Address = 10.1.0.2/24

PostUp = iptables -t nat -A PREROUTING -p tcp --dport 3389 -j DNAT --to-destination 192.168.1.21:3389; iptables -t nat -A POSTROUTING -p tcp --dport 3389 -j MASQUERADE

PostDown = iptables -t nat -D PREROUTING -p tcp --dport 3389 -j DNAT --to-destination 192.168.1.21:3389; iptables -t nat -D POSTROUTING -p tcp --dport 3389 -j MASQUERADE

[Peer] PublicKey = ........ AllowedIPs = 0.0.0.0/0 Endpoint = ...oraclevpsIP....:55108 PersistentKeepalive = 25

you are viewing a single comment's thread
view the rest of the comments
[–] eskuero@lemmy.fromshado.ws 2 points 1 year ago (1 children)

I remember having to enable forwarding of the initial packet when I used to forward a webserver

iptables -A FORWARD -i eth0 -o wg0 -p tcp --syn --dport 80 -m conntrack --ctstate NEW -j ACCEPT

[–] kokesh@lemmy.world 1 points 1 year ago (1 children)

Is it PostUp, or PostDown? Im noob with wireguard

[–] eskuero@lemmy.fromshado.ws 2 points 1 year ago (1 children)
[–] kokesh@lemmy.world 1 points 1 year ago* (last edited 1 year ago) (1 children)

On my server inside, or the VPS sitting out on the internet? wireguard doesn't start if I put it into PostUP on my server. Yes, I've changed the interface to enp1s0 and port to 3389

[–] eskuero@lemmy.fromshado.ws 1 points 1 year ago

Pretty sure you configure everything on the entrypoint, for the services runnin in your home machine it should be transparent